Configuration for my NixOS based systems and Home Manager
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Cleanup nvim config

+78 -61
+6 -2
nvim/init.lua
··· 140 140 -- LSP Documentation viewer 141 141 keymap("n", "K", "<cmd>lua vim.lsp.buf.hover()<CR>", silentnoremap) 142 142 143 + -- Lf 144 + keymap("n", "<leader>l", "<cmd>Lf<CR>", silentnoremap) 145 + 146 + -- Neogit 147 + keymap("n", "<leader>g", "<cmd>Neogit<CR>", silentnoremap) 148 + 143 149 -- Autoformat! 144 150 vim.api.nvim_create_user_command("Format", function(args) 145 151 local range = nil ··· 162 168 -- ######################## 163 169 -- LSP 164 170 require("lsp") 165 - -- Completion 166 - require("completion")
+42 -40
nvim/lua/completion.lua
··· 1 1 -- Copied from https://github.com/hrsh7th/nvim-cmp/?tab=readme-ov-file#recommended-configuration 2 - local cmp = require('cmp') 3 - cmp.setup({ 4 - snippet = { 5 - -- REQUIRED - you must specify a snippet engine 6 - expand = function(args) 7 - vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users. 8 - end 9 - }, 10 - window = { 11 - completion = cmp.config.window.bordered(), 12 - documentation = cmp.config.window.bordered() 13 - }, 14 - mapping = cmp.mapping.preset.insert({ 15 - ['<C-b>'] = cmp.mapping.scroll_docs(-4), 16 - ['<C-f>'] = cmp.mapping.scroll_docs(4), 17 - ['<C-Space>'] = cmp.mapping.complete(), 18 - ['<C-e>'] = cmp.mapping.abort(), 19 - ['<CR>'] = cmp.mapping.confirm({ select = true }) -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. 20 - }), 21 - sources = cmp.config.sources({ 22 - { name = 'lazydev', group_index = 0 }, 23 - { name = 'nvim_lsp' }, 24 - { name = 'vsnip' }, -- For vsnip users. 25 - { name = 'supermaven' }, 26 - { name = 'conjure' }, 27 - }, 28 - { { name = 'buffer' } }) 29 - }) 30 - require("cmp_git").setup() 31 - -- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore). 32 - cmp.setup.cmdline({ '/', '?' }, { 33 - mapping = cmp.mapping.preset.cmdline(), 34 - sources = { { name = 'buffer' } } 35 - }) 2 + return function() 3 + local cmp = require('cmp') 4 + cmp.setup({ 5 + snippet = { 6 + -- REQUIRED - you must specify a snippet engine 7 + expand = function(args) 8 + vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users. 9 + end 10 + }, 11 + window = { 12 + completion = cmp.config.window.bordered(), 13 + documentation = cmp.config.window.bordered() 14 + }, 15 + mapping = cmp.mapping.preset.insert({ 16 + ['<C-b>'] = cmp.mapping.scroll_docs(-4), 17 + ['<C-f>'] = cmp.mapping.scroll_docs(4), 18 + ['<C-Space>'] = cmp.mapping.complete(), 19 + ['<C-e>'] = cmp.mapping.abort(), 20 + ['<CR>'] = cmp.mapping.confirm({ select = true }) -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. 21 + }), 22 + sources = cmp.config.sources({ 23 + { name = 'lazydev', group_index = 0 }, 24 + { name = 'nvim_lsp' }, 25 + { name = 'vsnip' }, -- For vsnip users. 26 + { name = 'supermaven' }, 27 + { name = 'conjure' }, 28 + }, 29 + { { name = 'buffer' } }) 30 + }) 31 + require("cmp_git").setup() 32 + -- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore). 33 + cmp.setup.cmdline({ '/', '?' }, { 34 + mapping = cmp.mapping.preset.cmdline(), 35 + sources = { { name = 'buffer' } } 36 + }) 36 37 37 - -- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). 38 - cmp.setup.cmdline(':', { 39 - mapping = cmp.mapping.preset.cmdline(), 40 - sources = cmp.config.sources({ { name = 'path' } }, { { name = 'cmdline' } }), 41 - matching = { disallow_symbol_nonprefix_matching = false } 42 - }) 38 + -- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). 39 + cmp.setup.cmdline(':', { 40 + mapping = cmp.mapping.preset.cmdline(), 41 + sources = cmp.config.sources({ { name = 'path' } }, { { name = 'cmdline' } }), 42 + matching = { disallow_symbol_nonprefix_matching = false } 43 + }) 44 + end
+30 -19
nvim/lua/plugins.lua
··· 34 34 main = "everforest", 35 35 opts = { background = "hard" } 36 36 }, 37 - { "rebelot/kanagawa.nvim", opts = { compile = true }, priority = 1000, lazy = true }, 37 + { "rebelot/kanagawa.nvim", opts = { compile = true }, priority = 1000, lazy = true }, 38 38 { 39 39 'jesseleite/nvim-noirbuddy', 40 40 dependencies = { 41 41 'tjdevries/colorbuddy.nvim', 42 42 }, 43 43 lazy = true, 44 - --priority = 1000, 44 + priority = 1000, 45 45 opts = { 46 46 -- All of your `setup(opts)` will go here 47 47 preset = "slate", ··· 58 58 "hrsh7th/vim-vsnip", 59 59 "petertriho/cmp-git", 60 60 "hrsh7th/cmp-cmdline" 61 - } 61 + }, 62 + config = require('completion') 62 63 }, -- nvim lsp plugins 63 64 { 64 65 "neovim/nvim-lspconfig", ··· 97 98 }, -- Git stuff 98 99 -- GitGutter, shows inline difs 99 100 "airblade/vim-gitgutter", 100 - -- "tpope/vim-fugitive", -- old git command 101 101 { 102 102 "NeogitOrg/neogit", 103 103 dependencies = { ··· 146 146 }, 147 147 { 148 148 "nvim-lualine/lualine.nvim", 149 + config = true, 149 150 dependencies = { "nvim-tree/nvim-web-devicons" } 150 151 }, 151 152 -- Fuzzy finding stuff ··· 155 156 build = function() vim.fn["fzf#install"](0) end, 156 157 dependencies = { "junegunn/fzf.vim" } 157 158 }, 159 + -- A lua + nvim stdlib sort of thing 160 + { "nvim-lua/plenary.nvim", lazy = true, }, 158 161 -- Telescope, find anything fast 159 - "nvim-lua/plenary.nvim", 160 162 { 161 163 "nvim-telescope/telescope.nvim", 164 + config = true, 162 165 dependencies = { 163 166 "nvim-lua/plenary.nvim", 164 167 "nvim-telescope/telescope-symbols.nvim", ··· 166 169 }, 167 170 { 168 171 "folke/trouble.nvim", 169 - dependencies = "nvim-tree/nvim-web-devicons" 172 + dependencies = "nvim-tree/nvim-web-devicons", 173 + config = true, 170 174 }, 171 175 -- Which key is bound? 172 176 -- literally the best plugin ever ··· 213 217 { 214 218 "gpanders/nvim-parinfer", 215 219 ft = { "hy", "scheme", "scm", "clojure", "fennel", "janet", "lisp", "python", "lua" }, 220 + lazy = true, 216 221 config = function() 217 222 vim.g.parinfer_comment_chars = { ";", "#" } 218 223 vim.g.parinfer_force_balance = true ··· 289 294 }, 290 295 }) 291 296 end, 297 + lazy = true, 292 298 ft = { "hy", "scheme", "scm", "clojure", "fennel", "janet", "lisp", "python", "lua" } 293 299 }, 294 300 { ··· 303 309 { 304 310 "julienvincent/nvim-paredit-fennel", 305 311 dependencies = { "julienvincent/nvim-paredit" }, 312 + lazy = true, 306 313 ft = { "fennel" }, 307 314 config = true, 308 315 }, ··· 314 321 require("nvim-paredit-scheme").setup(require("nvim-paredit")) 315 322 end, 316 323 }, 317 - { "hiphish/rainbow-delimiters.nvim" }, 324 + { "hiphish/rainbow-delimiters.nvim", priority = 1050, }, 318 325 -- Conjure, lisp is magical 319 326 { 320 327 "Olical/conjure", 321 - ft = { "scheme", "scm", "lisp", "fennel", "clojure", "lua", "janet" }, 328 + dependencies = { "PaterJason/cmp-conjure" }, 322 329 config = function() 323 330 vim.g["conjure#client#scheme#stdio#command"] = "gxi" 324 331 vim.g["conjure#client#scheme#stdio#prompt_pattern"] = "%d*> $?" 325 332 end, 326 - dependencies = { "PaterJason/cmp-conjure" } 333 + lazy = true, 334 + ft = { "scheme", "scm", "lisp", "fennel", "clojure", "lua", "janet" }, 327 335 }, 328 - { "PaterJason/cmp-conjure", lazy = true }, 329 - { "p1xelHer0/gerbil.nvim", ft = "scheme" }, -- Fennel, Luasthp 330 - { "jaawerth/fennel.vim", lazy = true, ft = "fennel" }, 331 - { "rktjmp/hotpot.nvim", lazy = true, ft = "fennel" }, 332 - { "Olical/nfnl", ft = "fennel" }, -- Rust stuff 336 + { "PaterJason/cmp-conjure", lazy = true }, 337 + { "p1xelHer0/gerbil.nvim", lazy = true, ft = "scheme", config = true }, -- Fennel, Luasthp 338 + { "jaawerth/fennel.vim", lazy = true, ft = "fennel", config = true }, 339 + { "rktjmp/hotpot.nvim", lazy = true, ft = "fennel", config = true }, 340 + { "Olical/nfnl", lazy = true, ft = "fennel", config = true }, -- Rust stuff 333 341 { 334 342 "simrat39/rust-tools.nvim", 343 + lazy = true, 335 344 ft = { "rust" }, 336 345 config = function() 337 346 local rt = require("rust-tools") ··· 352 361 end, 353 362 dependencies = { "nvim-lua/plenary.nvim" } 354 363 }, 355 - { "mfussenegger/nvim-dap", lazy = true, ft = { "c", "rust" } }, 364 + { "mfussenegger/nvim-dap", lazy = true, ft = { "c", "rust" }, config = true }, 356 365 { 357 366 "saecki/crates.nvim", 358 367 tag = "v0.4.0", 359 368 dependencies = { "nvim-lua/plenary.nvim" }, 360 369 config = function() require("crates").setup() end, 370 + lazy = true, 361 371 ft = { "rust" } 362 372 }, -- RISC-V Assembly syntax highlighting 363 373 { "kylelaker/riscv.vim", ft = "riscv" }, -- Hare Stuff 364 374 -- Haredoc 365 375 { 366 376 url = "https://git.sr.ht/~torresjrjr/vim-haredoc", 377 + lazy = true, 367 378 ft = { "hare" }, 368 379 branch = "dev" 369 - }, -- Hare.vim 370 - { url = "https://git.sr.ht/~sircmpwn/hare.vim", ft = { "hare" } }, -- TCL 371 - { "lewis6991/tree-sitter-tcl", build = "make" }, -- LF 372 - { "ptzz/lf.vim", cmd = { "Lf" }, dependencies = { "voldikss/vim-floaterm" } }, 380 + }, -- Hare.vim 381 + { url = "https://git.sr.ht/~sircmpwn/hare.vim", ft = { "hare" } }, -- TCL 382 + { "lewis6991/tree-sitter-tcl", lazy = true, build = "make" }, -- LF 383 + { "ptzz/lf.vim", lazy = true, cmd = { "Lf" }, dependencies = { "voldikss/vim-floaterm" } }, 373 384 -- SuperMaven, another AI coding tool 374 385 { 375 386 "supermaven-inc/supermaven-nvim",