summaryrefslogtreecommitdiff
path: root/neovim.nix
diff options
context:
space:
mode:
Diffstat (limited to 'neovim.nix')
-rw-r--r--neovim.nix99
1 files changed, 47 insertions, 52 deletions
diff --git a/neovim.nix b/neovim.nix
index 74dc667..f909fcf 100644
--- a/neovim.nix
+++ b/neovim.nix
@@ -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
+}