summaryrefslogtreecommitdiff
path: root/users/seth/programs/neovim/default.nix
diff options
context:
space:
mode:
authorseth <[email protected]>2023-01-26 06:08:41 -0500
committerseth <[email protected]>2023-01-26 06:08:41 -0500
commit08895833e51bdfd760f2b4915a3997c13fe65b13 (patch)
tree76e0ec29dea51c9a0aa0502cf8e87eadc71dd3ec /users/seth/programs/neovim/default.nix
parent43bf016d0fb5b3b2db796fdc37abf243f1223df1 (diff)
more refactoring
Diffstat (limited to 'users/seth/programs/neovim/default.nix')
-rw-r--r--users/seth/programs/neovim/default.nix103
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 = {