From fd9e122fca641c2ea74d9784e22587956319036d Mon Sep 17 00:00:00 2001 From: wi11-holdsworth <83637728+wi11-holdsworth@users.noreply.github.com> Date: Wed, 20 Aug 2025 22:56:24 +1000 Subject: [PATCH] install more nvim plugins --- modules/nixos/features/nixvim.nix | 77 +++++++++++++++++++++++-------- 1 file changed, 58 insertions(+), 19 deletions(-) diff --git a/modules/nixos/features/nixvim.nix b/modules/nixos/features/nixvim.nix index 1cbd8dd..862d6f6 100644 --- a/modules/nixos/features/nixvim.nix +++ b/modules/nixos/features/nixvim.nix @@ -12,44 +12,83 @@ in environment.variables.EDITOR = "nvim"; programs.nixvim = { enable = true; - opts = { - shiftwidth = 2; - number = true; - relativenumber = true; - autoindent = true; - tabstop = 2; - expandtab = true; + clipboard = { + providers.wl-copy.enable = true; + register = "unnamedplus"; }; colorschemes.catppuccin = { enable = true; settings.background.dark = "mocha"; }; + dependencies = { + tree-sitter.enable = true; + nodejs.enable = true; + gcc.enable = true; + }; + diagnostic.settings.virtual_lines = true; + opts = { + autoindent = true; + expandtab = true; + number = true; + relativenumber = true; + shiftwidth = 2; + tabstop = 2; + }; plugins = { + # autoclose brackets + autoclose.enable = true; + + # completion window cmp = { enable = true; autoEnableSources = true; + settings = { + mapping = { + "" = "cmp.mapping.complete()"; + "" = "cmp.mapping.scroll_docs(-4)"; + "" = "cmp.mapping.close()"; + "" = "cmp.mapping.scroll_docs(4)"; + "" = "cmp.mapping.confirm({ select = true })"; + "" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})"; + "" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})"; + }; + sources = [ + { name = "nvim_lsp"; } + { name = "path"; } + { name = "buffer"; } + ]; + }; }; - cmp-nvim-lsp.enable = true; - cmp_luasnip.enable = true; - cmp-treesitter.enable = true; - cmp-async-path.enable = true; - cmp-npm.enable = true; - cmp-emoji.enable = true; - cmp-dictionary.enable = true; - cmp-calc.enable = true; + + # git changes in margin + gitsigns.enable = true; + + # opens last edit position + lastplace.enable = true; + + # lsp servers lsp = { enable = true; + inlayHints = true; servers = { nixd.enable = true; - rust_analyzer.enable = true; + rust_analyzer = { + enable = true; + installCargo = true; + installRustc = true; + }; }; }; lsp-format.enable = true; - autoclose.enable = true; + lsp-lines.enable = true; + lsp-signature.enable = true; + lspkind.enable = true; + + # status bar lualine.enable = true; - luasnip.enable = true; + + # syntax highlighting treesitter.enable = true; - lastplace.enable = true; }; }; };