neovim: no longer mangle init
This commit is contained in:
parent
fe7ea07235
commit
f8540d0e37
1 changed files with 21 additions and 27 deletions
|
@ -20,24 +20,28 @@ in
|
||||||
# description = "The package to use for the neovim binary.";
|
# description = "The package to use for the neovim binary.";
|
||||||
# };
|
# };
|
||||||
};
|
};
|
||||||
config = lib.mkIf cfg.enable {
|
config =
|
||||||
# Set nvim as manpager and default editor
|
let
|
||||||
home.sessionVariables = {
|
nvim-treesitter = pkgs.vimPlugins.nvim-treesitter;
|
||||||
EDITOR = "nvim";
|
treesitterWithGrammars = nvim-treesitter.withPlugins (_: nvim-treesitter.allGrammars);
|
||||||
MANPAGER = "nvim +Man!";
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.neovim =
|
treesitter-parsers = pkgs.symlinkJoin {
|
||||||
let
|
name = "treesitter-parsers";
|
||||||
nvim-treesitter = pkgs.vimPlugins.nvim-treesitter;
|
paths = treesitterWithGrammars.dependencies;
|
||||||
treesitterWithGrammars = nvim-treesitter.withPlugins (_: nvim-treesitter.allGrammars);
|
};
|
||||||
|
in
|
||||||
|
lib.mkIf cfg.enable {
|
||||||
|
# Set nvim as manpager and default editor
|
||||||
|
home.sessionVariables = {
|
||||||
|
EDITOR = "nvim";
|
||||||
|
MANPAGER = "nvim +Man!";
|
||||||
|
};
|
||||||
|
|
||||||
treesitter-parsers = pkgs.symlinkJoin {
|
xdg.configFile."nvim/lua/parsers.lua".text = ''
|
||||||
name = "treesitter-parsers";
|
vim.opt.runtimepath:append ("${treesitter-parsers}")
|
||||||
paths = treesitterWithGrammars.dependencies;
|
'';
|
||||||
};
|
|
||||||
in
|
programs.neovim = {
|
||||||
{
|
|
||||||
enable = true;
|
enable = true;
|
||||||
coc.enable = false;
|
coc.enable = false;
|
||||||
package = cfg.package;
|
package = cfg.package;
|
||||||
|
@ -45,16 +49,6 @@ in
|
||||||
withPython3 = true;
|
withPython3 = true;
|
||||||
withRuby = true;
|
withRuby = true;
|
||||||
|
|
||||||
# TODO: nvim config nix import
|
|
||||||
extraLuaConfig = ''
|
|
||||||
-- bootstrap lazy.nvim, LazyVim and your plugins
|
|
||||||
require("config.lazy")
|
|
||||||
|
|
||||||
vim.g.editorconfig = true
|
|
||||||
|
|
||||||
vim.opt.runtimepath:append ("${treesitter-parsers}")
|
|
||||||
'';
|
|
||||||
|
|
||||||
plugins = [
|
plugins = [
|
||||||
treesitterWithGrammars
|
treesitterWithGrammars
|
||||||
];
|
];
|
||||||
|
@ -67,5 +61,5 @@ in
|
||||||
fzf
|
fzf
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue