diff options
Diffstat (limited to 'users/seth/programs')
| -rw-r--r-- | users/seth/programs/default.nix | 60 | ||||
| -rw-r--r-- | users/seth/programs/neovim/config/init.lua | 2 | ||||
| -rw-r--r-- | users/seth/programs/neovim/config/lua/getchoo/lsp/config/sources.lua | 3 | ||||
| -rw-r--r-- | users/seth/programs/neovim/default.nix | 103 | ||||
| -rw-r--r-- | users/seth/programs/npm.nix | 10 |
5 files changed, 101 insertions, 77 deletions
diff --git a/users/seth/programs/default.nix b/users/seth/programs/default.nix index 5773b22..8cb4a6c 100644 --- a/users/seth/programs/default.nix +++ b/users/seth/programs/default.nix @@ -1,26 +1,38 @@ -{pkgs, ...}: { - imports = [ - ./git.nix - # ./mangohud - ./neovim - # ./npm.nix - ./starship.nix - ./vim.nix - ./xdg.nix - ]; +{ + config, + pkgs, + ... +}: let + develPackages = + if config.seth.devel.enable + then + with pkgs; [ + alejandra + clang + deadnix + eclint + statix + ] + else []; +in { + imports = [ + ./git.nix + # ./mangohud + ./neovim + ./starship.nix + ./vim.nix + ./xdg.nix + ]; - home.packages = with pkgs; [ - alejandra - bat - clang - deadnix - eclint - exa - fd - gh - lld - ripgrep - statix - python311 - ]; + home.packages = with pkgs; + [ + bat + exa + fd + gh + lld + ripgrep + python311 + ] + ++ develPackages; } diff --git a/users/seth/programs/neovim/config/init.lua b/users/seth/programs/neovim/config/init.lua index 1dbf9bc..e9820fc 100644 --- a/users/seth/programs/neovim/config/init.lua +++ b/users/seth/programs/neovim/config/init.lua @@ -5,7 +5,7 @@ local cmd = vim.cmd local opt = vim.opt -vim.g.use_lsp_plugins = false +vim.g.use_lsp_plugins = true vim.g.use_mason = false require("getchoo") diff --git a/users/seth/programs/neovim/config/lua/getchoo/lsp/config/sources.lua b/users/seth/programs/neovim/config/lua/getchoo/lsp/config/sources.lua index 3b67ab2..318f67c 100644 --- a/users/seth/programs/neovim/config/lua/getchoo/lsp/config/sources.lua +++ b/users/seth/programs/neovim/config/lua/getchoo/lsp/config/sources.lua @@ -11,7 +11,10 @@ local M = { null_ls = { diagnostics.alex, diagnostics.codespell, + diagnostics.deadnix, diagnostics.pylint, + diagnostics.statix, + formatting.alejandra, formatting.codespell, formatting.prettier, formatting.rustfmt, 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 = { diff --git a/users/seth/programs/npm.nix b/users/seth/programs/npm.nix deleted file mode 100644 index 07f7037..0000000 --- a/users/seth/programs/npm.nix +++ /dev/null @@ -1,10 +0,0 @@ -{config, ...}: { - programs.npm = { - enable = true; - npmrc = '' - prefix=${config.xdg.dataHome}/npm - cache=${config.xdg.cacheHome}/npm - init-module=${config.xdg.configHome}/npm/config/npm-init.js - ''; - }; -} |
