Skip to content

Commit

Permalink
flake.lock: update neovim-wrapper (#336)
Browse files Browse the repository at this point in the history
* flake.lock: update neovim-wrapper

* modules/default: half size of plugins
  • Loading branch information
Gerg-L authored Jul 13, 2024
1 parent 5fab82b commit ce0b361
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 16 deletions.
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 30 additions & 13 deletions modules/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,27 @@ inputs: {
# build a vim plugin with the given name and arguments
# if the plugin is nvim-treesitter, warn the user to use buildTreesitterPlug
# instead
buildPlug = {pname, ...} @ args:
assert assertMsg (pname != "nvim-treesitter") "Use buildTreesitterPlug for building nvim-treesitter.";
buildVimPlugin (args
// {
version = "master";
src = getAttr ("plugin-" + pname) inputs;
});
buildPlug = {pname, ...} @ attrs: let
src = getAttr ("plugin-" + pname) inputs;
in
pkgs.runCommand pname {
inherit src;
version = src.shortRev or src.shortDirtyRev or "dirty";
}
// attrs
''
mkdir -p $out
cp -r . $out
'';

noBuildPlug = {pname, ...} @ attrs: let
input = getAttr ("plugin-" + pname) inputs;
in
{
version = input.shortRev or input.shortDirtyRev or "dirty";
outPath = getAttr ("plugin-" + pname) inputs;
}
// attrs;

buildTreesitterPlug = grammars: vimPlugins.nvim-treesitter.withPlugins (_: grammars);

Expand All @@ -53,11 +67,14 @@ inputs: {
then (buildTreesitterPlug vimOptions.treesitter.grammars)
else if (plug == "flutter-tools-patched")
then
(buildPlug {
pname = "flutter-tools";
patches = [../patches/flutter-tools.patch];
})
else (buildPlug {pname = plug;})
(
buildPlug
{
pname = "flutter-tools";
patches = [../patches/flutter-tools.patch];
}
)
else noBuildPlug {pname = plug;}
)
else plug
))
Expand All @@ -84,7 +101,7 @@ inputs: {
neovim-wrapped = inputs.neovim-wrapper.legacyPackages.${pkgs.stdenv.system}.neovimWrapper {
neovim = vimOptions.package;
plugins = concatLists [builtStartPlugins builtOptPlugins];
wrapperArgs = ["--set" "NVIM_APPNAME" "nvf"];
appName = "nvf";
initViml = vimOptions.builtConfigRC;
extraBinPath = vimOptions.extraPackages;

Expand Down

0 comments on commit ce0b361

Please sign in to comment.