plugins.lua (8912B)
1 return { 2 -- General 3 { 4 'echasnovski/mini.nvim', 5 config = function() 6 require("mini.align").setup() 7 require("mini.pairs").setup() 8 -- require("mini.ai").setup() 9 require("mini.cursorword").setup() 10 end 11 }, 12 { 13 "folke/persistence.nvim", 14 event = "BufReadPre", -- this will only start session saving when an actual file was opened 15 opts = { 16 need = 2, -- require 2 open file buffers before saving session 17 } 18 }, 19 { 20 'saghen/blink.cmp', 21 -- optional: provides snippets for the snippet source 22 -- dependencies = 'rafamadriz/friendly-snippets', 23 24 -- use a release tag to download pre-built binaries 25 version = '*', 26 -- AND/OR build from source, requires nightly: https://rust-lang.github.io/rustup/concepts/channels.html#working-with-nightly-rust 27 -- build = 'cargo build --release', 28 -- If you use nix, you can build from source using latest nightly rust with: 29 -- build = 'nix run .#build-plugin', 30 31 ---@module 'blink.cmp' 32 ---@type blink.cmp.Config 33 opts = { 34 -- 'default' for mappings similar to built-in completion 35 -- 'super-tab' for mappings similar to vscode (tab to accept, arrow keys to navigate) 36 -- 'enter' for mappings similar to 'super-tab' but with 'enter' to accept 37 -- See the full "keymap" documentation for information on defining your own keymap. 38 keymap = { preset = 'super-tab' }, 39 40 appearance = { 41 -- Sets the fallback highlight groups to nvim-cmp's highlight groups 42 -- Useful for when your theme doesn't support blink.cmp 43 -- Will be removed in a future release 44 use_nvim_cmp_as_default = true, 45 -- Set to 'mono' for 'Nerd Font Mono' or 'normal' for 'Nerd Font' 46 -- Adjusts spacing to ensure icons are aligned 47 nerd_font_variant = 'mono' 48 }, 49 50 -- Default list of enabled providers defined so that you can extend it 51 -- elsewhere in your config, without redefining it, due to `opts_extend` 52 sources = { 53 default = { 'lsp', 'path', 'snippets', 'buffer' }, 54 }, 55 }, 56 opts_extend = { "sources.default" } 57 }, 58 { 59 "kylechui/nvim-surround", 60 version = "*", -- Use for stability; omit to use `main` branch for the latest features 61 event = "VeryLazy", 62 config = function() 63 require("nvim-surround").setup({ 64 -- Configuration here, or leave empty to use defaults 65 }) 66 end 67 }, 68 { 69 'windwp/nvim-autopairs', 70 event = "InsertEnter", 71 config = true, 72 opts = { 73 enable_check_bracket_line = false 74 } 75 }, 76 { 77 "chentoast/marks.nvim", 78 event = "VeryLazy", 79 opts = {}, 80 }, 81 -- { 82 -- "chrisgrieser/nvim-spider", 83 -- keys = { 84 -- { "w", "<cmd>lua require('spider').motion('w')<CR>", mode = { "n", "o", "x" } }, 85 -- { "e", "<cmd>lua require('spider').motion('e')<CR>", mode = { "n", "o", "x" } }, 86 -- { "b", "<cmd>lua require('spider').motion('b')<CR>", mode = { "n", "o", "x" } }, 87 -- }, 88 -- }, 89 90 -- tpope 91 { 'tpope/vim-commentary' }, -- toggle comments 92 { 'tpope/vim-fugitive' }, -- git plug-in 93 { 'tpope/vim-endwise' }, -- auto add endfunction/endif/etc 94 { 'tpope/vim-repeat' }, -- improves . command to repeat last command 95 { 'tpope/vim-sleuth' }, -- automatically changes indents to fit file type 96 { 'tpope/vim-unimpaired' }, -- change options with co or [o and ]o 97 { 'tpope/vim-rsi' }, -- readline in insert mode 98 { 'tpope/vim-eunuch' }, -- unix commands in vim 99 { 'tpope/vim-dispatch' }, -- asynchronous build 100 101 -- Window 102 { 103 'akinsho/toggleterm.nvim', version = "*", config = true, 104 opts = { 105 open_mapping = [[<c-_>]], 106 } 107 }, 108 -- { 109 -- 'nvim-telescope/telescope.nvim', tag = '0.1.8', 110 -- dependencies = { 'nvim-lua/plenary.nvim' } 111 -- }, 112 { 113 "ibhagwan/fzf-lua", 114 -- optional for icon support 115 dependencies = { "nvim-tree/nvim-web-devicons" }, 116 -- or if using mini.icons/mini.nvim 117 -- dependencies = { "echasnovski/mini.icons" }, 118 opts = {} 119 }, 120 -- { 121 -- "nvim-focus/focus.nvim", 122 -- version = false, 123 -- config = function() 124 -- require("focus").setup({ 125 -- excluded_buftypes = { "terminal" }, 126 -- }) 127 -- end, 128 -- }, 129 130 -- Aesthetic 131 { 'nvim-tree/nvim-web-devicons' }, 132 { 133 'lewis6991/gitsigns.nvim', 134 config = function() 135 require('gitsigns').setup{ 136 on_attach = function(bufnr) 137 local gitsigns = require('gitsigns') 138 local function map(mode, l, r, opts) 139 opts = opts or {} 140 opts.buffer = bufnr 141 vim.keymap.set(mode, l, r, opts) 142 end 143 -- Navigation 144 map('n', ']c', function() 145 if vim.wo.diff then 146 vim.cmd.normal({']c', bang = true}) 147 else 148 gitsigns.nav_hunk('next') 149 end 150 end) 151 map('n', '[c', function() 152 if vim.wo.diff then 153 vim.cmd.normal({'[c', bang = true}) 154 else 155 gitsigns.nav_hunk('prev') 156 end 157 end) 158 -- Actions 159 map('n', '<leader>hs', gitsigns.stage_hunk) 160 map('n', '<leader>hr', gitsigns.reset_hunk) 161 map('v', '<leader>hs', function() gitsigns.stage_hunk {vim.fn.line('.'), vim.fn.line('v')} end) 162 map('v', '<leader>hr', function() gitsigns.reset_hunk {vim.fn.line('.'), vim.fn.line('v')} end) 163 map('n', '<leader>hS', gitsigns.stage_buffer) 164 map('n', '<leader>hu', gitsigns.undo_stage_hunk) 165 -- map('n', '<leader>hR', gitsigns.reset_buffer) 166 map('n', '<leader>hp', gitsigns.preview_hunk) 167 map('n', '<leader>hb', function() gitsigns.blame_line{full=true} end) 168 -- map('n', '<leader>tb', gitsigns.toggle_current_line_blame) 169 map('n', '<leader>hd', gitsigns.diffthis) 170 map('n', '<leader>hD', function() gitsigns.diffthis('~') end) 171 -- map('n', '<leader>td', gitsigns.toggle_deleted) 172 -- Text object 173 map({'o', 'x'}, 'ih', ':<C-U>Gitsigns select_hunk<CR>') 174 end 175 } 176 end 177 }, 178 { 179 "folke/todo-comments.nvim", 180 dependencies = { "nvim-lua/plenary.nvim" }, 181 opts = { } 182 }, 183 184 -- Language 185 { 186 "nvim-treesitter/nvim-treesitter", 187 build = function() 188 require("nvim-treesitter.install").update({ with_sync = true })() 189 end, 190 }, 191 { 'David-Kunz/treesitter-unit', 192 config = function() 193 vim.api.nvim_set_keymap('x', 'iu', ':lua require"treesitter-unit".select()<CR>', {noremap=true}) 194 vim.api.nvim_set_keymap('x', 'au', ':lua require"treesitter-unit".select(true)<CR>', {noremap=true}) 195 vim.api.nvim_set_keymap('o', 'iu', ':<c-u>lua require"treesitter-unit".select()<CR>', {noremap=true}) 196 vim.api.nvim_set_keymap('o', 'au', ':<c-u>lua require"treesitter-unit".select(true)<CR>', {noremap=true}) 197 end 198 }, 199 { 200 "tadmccorkle/markdown.nvim", 201 ft = "markdown", 202 opts = { 203 -- configuration here or empty for defaults 204 }, 205 }, 206 { 'eevolang/eevo.vim' }, 207 -- { "bullets-vim/bullets.vim" }, 208 -- { 209 -- "julienvincent/nvim-paredit", 210 -- config = function() 211 -- require("nvim-paredit").setup() 212 -- end 213 -- }, 214 { 215 'nvim-orgmode/orgmode', 216 event = 'VeryLazy', 217 ft = { 'org' }, 218 config = function() 219 require('orgmode').setup({ 220 org_agenda_files = '~/stuff/notes/**/*', 221 org_default_notes_file = '~/stuff/notes/notes.org', 222 org_hide_emphasis_markers = true 223 }) 224 end 225 }, 226 { 227 'akinsho/org-bullets.nvim', 228 config = function() 229 require("org-bullets").setup { 230 concealcursor = true, -- If false then when the cursor is on a line underlying characters are visible 231 symbols = { 232 list = "•", 233 headlines = { "◉", "○", "✸", "✿" }, 234 checkboxes = { 235 half = { "-", "@org.checkbox.halfchecked" }, 236 done = { "✓", "@org.keyword.done" }, 237 todo = { " ", "@org.keyword.todo" }, 238 }, 239 } 240 } 241 end 242 }, 243 -- { 244 -- "nvim-orgmode/telescope-orgmode.nvim", 245 -- event = "VeryLazy", 246 -- dependencies = { "nvim-orgmode/orgmode", "nvim-telescope/telescope.nvim", }, 247 -- config = function() 248 -- require("telescope").load_extension("orgmode") 249 -- vim.keymap.set("n", "<leader>r", require("telescope").extensions.orgmode.refile_heading) 250 -- vim.keymap.set("n", "<leader>h", require("telescope").extensions.orgmode.search_headings) 251 -- vim.keymap.set("n", "<leader>l", require("telescope").extensions.orgmode.insert_link) 252 -- end, 253 -- }, 254 -- { 'vim-scripts/a.vim'}, 255 { 256 "lervag/vimtex", 257 lazy = false, -- we don't want to lazy load VimTeX 258 init = function() 259 -- VimTeX configuration goes here, e.g. 260 vim.g.vimtex_view_method = "zathura" 261 end 262 }, 263 { 264 'neovim/nvim-lspconfig' 265 }, 266 { 267 'ludovicchabant/vim-gutentags', 268 }, 269 }