-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(neovim): independence from home-manager
switch from lazy.nvim to lz.n
- Loading branch information
Showing
15 changed files
with
287 additions
and
378 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
{ | ||
lib, | ||
neovim-unwrapped, | ||
neovimUtils, | ||
vimPlugins, | ||
wrapNeovimUnstable, | ||
replaceVars, | ||
|
||
# runtime dependencies | ||
astro-language-server, | ||
basedpyright, | ||
bash-language-server, | ||
biome, | ||
docker-compose-language-service, | ||
dockerfile-language-server-nodejs, | ||
hadolint, | ||
lua-language-server, | ||
nixd, | ||
nixfmt-rfc-style, | ||
rubocop, | ||
ruff, | ||
shellcheck, | ||
shfmt, | ||
solargraph, | ||
stylua, | ||
taplo, | ||
terraform-ls, | ||
tinymist, | ||
typescript-language-server, | ||
typos-lsp, | ||
typstyle, | ||
wakatime-cli, | ||
yaml-language-server, | ||
}: | ||
let | ||
mapBuiltinPluginToPath = map (p: "$out/share/nvim/runtime/plugin/${p}"); | ||
disabledBuiltinPluginPaths = mapBuiltinPluginToPath [ | ||
"gzip.vim" | ||
"matchit.vim" | ||
"matchparen.vim" | ||
"netrwPlugin.vim" | ||
"tarPlugin.vim" | ||
"tohtml.lua" | ||
"tutor.vim" | ||
"zipPlugin.vim" | ||
]; | ||
|
||
language-servers = [ | ||
# astro | ||
astro-language-server | ||
# bash | ||
bash-language-server | ||
shellcheck | ||
shfmt | ||
# docker | ||
dockerfile-language-server-nodejs | ||
hadolint | ||
docker-compose-language-service | ||
# javascript | ||
biome | ||
# lua | ||
lua-language-server | ||
stylua | ||
# nix | ||
nixd | ||
nixfmt-rfc-style | ||
# python | ||
basedpyright | ||
ruff | ||
# ruby | ||
solargraph | ||
rubocop | ||
# terraform | ||
terraform-ls | ||
# toml | ||
taplo | ||
# typescript | ||
typescript-language-server | ||
# typst | ||
tinymist | ||
typstyle | ||
# yaml | ||
yaml-language-server | ||
# spell check | ||
typos-lsp | ||
]; | ||
|
||
tools = [ | ||
(wakatime-cli.overrideAttrs { __darwinAllowLocalNetworking = true; }) | ||
]; | ||
|
||
extraWrapperArgs = [ | ||
"--suffix" | ||
"PATH" | ||
":" | ||
(lib.makeBinPath (language-servers ++ tools)) | ||
]; | ||
|
||
config = neovimUtils.makeNeovimConfig { | ||
withNodeJs = true; # for copilot | ||
withRuby = false; | ||
withPython3 = false; | ||
vimAlias = true; | ||
luaRcContent = builtins.readFile ( | ||
replaceVars ./init.lua { | ||
myconfig = lib.fileset.toSource { | ||
root = ./.; | ||
fileset = lib.fileset.difference ./. ( | ||
lib.fileset.unions [ | ||
./init.lua | ||
./plugins.nix | ||
./default.nix | ||
] | ||
); | ||
}; | ||
} | ||
); | ||
|
||
plugins = import ./plugins.nix { inherit vimPlugins; }; | ||
|
||
}; | ||
in | ||
(wrapNeovimUnstable neovim-unwrapped ( | ||
# if wrapperArgs is defined directly in config, it will somehow be overwritten | ||
config // { wrapperArgs = config.wrapperArgs ++ extraWrapperArgs; } | ||
)).overrideAttrs | ||
(oldAttrs: { | ||
postInstall = | ||
(oldAttrs.postInstall or "") | ||
+ '' | ||
echo ${lib.concatStringsSep " " disabledBuiltinPluginPaths} | xargs rm | ||
''; | ||
}) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.