diff options
| author | seth <[email protected]> | 2024-10-29 23:05:02 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-10-30 03:05:02 +0000 |
| commit | 2e766b185d2bb6fa38c0bd8fb980ba8fffeedb3a (patch) | |
| tree | 7c4bc93efe19c00f58bf4df2447b4677488d70ad /neovim.nix | |
| parent | 310fdf8de53d98ddd3a56936c131186e25814f0f (diff) | |
use custom wrapper (#70)
* use custom wrapper
* flake: use nix-filter on self
* don't load remote plugins
* use nvim-cmp and fidget from luarocks
Diffstat (limited to 'neovim.nix')
| -rw-r--r-- | neovim.nix | 99 |
1 files changed, 47 insertions, 52 deletions
@@ -1,9 +1,10 @@ { - lib, + mkNeovimDerivation, + getchoo-neovim-config, + version, + actionlint, glow, - neovim-unwrapped, - neovimUtils, nil, nixfmt-rfc-style, nodePackages, @@ -12,17 +13,49 @@ statix, typos-lsp, vimPlugins, - wrapNeovimUnstable, - - getchoo-neovim-config, + writeTextDir, }: -let - plugins = with vimPlugins; [ - getchoo-neovim-config +mkNeovimDerivation { + pname = "getchvim"; + inherit version; + + luaRc = writeTextDir "init.lua" "require('getchoo')" + "/init.lua"; + + runtimePrograms = [ + # External programs + glow + + # LSP + ## General + typos-lsp + + ## Language-specific + nodePackages.bash-language-server + shellcheck + shfmt + nil + nixfmt-rfc-style + + # Linters + nodePackages.alex + actionlint + statix + ]; + + luaPluginPackages = + luaPackages: with luaPackages; [ + lz-n - # lazy loader - lz-n + # Coding + nvim-cmp + + # LSP + fidget-nvim + ]; + + vimPluginPackages = with vimPlugins; [ + getchoo-neovim-config # Editing flash-nvim @@ -37,59 +70,21 @@ let lualine-nvim # Coding - nvim-cmp - luasnip cmp-async-path cmp-buffer cmp-nvim-lsp crates-nvim + ## TODO: Use luarocks plugin when it's not broken gitsigns-nvim nvim-lint + ## TODO: Ditto telescope-nvim # dependent on > plenary-nvim # LSP - fidget-nvim lsp-format-nvim nvim-lspconfig trouble-nvim ]; - - extraPackages = [ - # External programs - glow - - # LSP - ## General - typos-lsp - - ## Language-specific - nodePackages.bash-language-server - shellcheck - shfmt - nil - nixfmt-rfc-style - - # Linters - nodePackages.alex - actionlint - statix - ]; - - baseConfig = neovimUtils.makeNeovimConfig { - withRuby = false; - inherit plugins; - }; - - config = baseConfig // { - luaRcContent = "require('getchoo')"; - wrapperArgs = baseConfig.wrapperArgs ++ [ - "--suffix" - "PATH" - ":" - "${lib.makeBinPath extraPackages}" - ]; - }; -in -wrapNeovimUnstable neovim-unwrapped config +} |
