diff options
Diffstat (limited to 'users/seth/programs/neovim/default.nix')
| -rw-r--r-- | users/seth/programs/neovim/default.nix | 103 |
1 files changed, 61 insertions, 42 deletions
diff --git a/users/seth/programs/neovim/default.nix b/users/seth/programs/neovim/default.nix index 7bf2095..58d5634 100644 --- a/users/seth/programs/neovim/default.nix +++ b/users/seth/programs/neovim/default.nix @@ -1,47 +1,66 @@ -{pkgs, ...}: { +{ + config, + pkgs, + ... +}: let + lspPackages = + if config.seth.devel.enable + then + with pkgs; [ + alejandra + clang + codespell + deadnix + nodePackages.alex + nodePackages.bash-language-server + nodePackages.prettier + nodePackages.pyright + pylint + rust-analyzer + rustfmt + statix + stylua + sumneko-lua-language-server + yapf + ] + else []; + + lspPlugins = + if config.seth.devel.enable + then + with pkgs.vimPlugins; [ + nvim-tree-lua + nvim-lspconfig + null-ls-nvim + plenary-nvim + nvim-treesitter.withAllGrammars + nvim-cmp + cmp-nvim-lsp + cmp-buffer + cmp-path + cmp-vsnip + vim-vsnip + luasnip + cmp_luasnip + trouble-nvim + nvim-web-devicons + telescope-nvim + gitsigns-nvim + editorconfig-nvim + ] + else []; +in { programs.neovim = { enable = true; - extraPackages = with pkgs; [ - alejandra - clang - codespell - deadnix - nodePackages.alex - nodePackages.bash-language-server - nodePackages.prettier - nodePackages.pyright - pylint - rust-analyzer - rustfmt - statix - stylua - sumneko-lua-language-server - yapf - ]; - plugins = with pkgs.vimPlugins; [ - lualine-nvim - catppuccin-nvim - barbar-nvim - lightspeed-nvim - nvim-tree-lua - nvim-lspconfig - null-ls-nvim - plenary-nvim - (nvim-treesitter.withPlugins (plugins: pkgs.tree-sitter.allGrammars)) - nvim-cmp - cmp-nvim-lsp - cmp-buffer - cmp-path - cmp-vsnip - vim-vsnip - luasnip - cmp_luasnip - trouble-nvim - nvim-web-devicons - telescope-nvim - gitsigns-nvim - editorconfig-nvim - ]; + extraPackages = lspPackages; + plugins = with pkgs.vimPlugins; + [ + lualine-nvim + catppuccin-nvim + barbar-nvim + lightspeed-nvim + ] + ++ lspPlugins; }; xdg.configFile.nvim = { |
