neovim: no longer mangle init
This commit is contained in:
parent
fe7ea07235
commit
f8540d0e37
1 changed files with 21 additions and 27 deletions
|
@ -20,14 +20,7 @@ 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
|
|
||||||
home.sessionVariables = {
|
|
||||||
EDITOR = "nvim";
|
|
||||||
MANPAGER = "nvim +Man!";
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.neovim =
|
|
||||||
let
|
let
|
||||||
nvim-treesitter = pkgs.vimPlugins.nvim-treesitter;
|
nvim-treesitter = pkgs.vimPlugins.nvim-treesitter;
|
||||||
treesitterWithGrammars = nvim-treesitter.withPlugins (_: nvim-treesitter.allGrammars);
|
treesitterWithGrammars = nvim-treesitter.withPlugins (_: nvim-treesitter.allGrammars);
|
||||||
|
@ -37,7 +30,18 @@ in
|
||||||
paths = treesitterWithGrammars.dependencies;
|
paths = treesitterWithGrammars.dependencies;
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
lib.mkIf cfg.enable {
|
||||||
|
# Set nvim as manpager and default editor
|
||||||
|
home.sessionVariables = {
|
||||||
|
EDITOR = "nvim";
|
||||||
|
MANPAGER = "nvim +Man!";
|
||||||
|
};
|
||||||
|
|
||||||
|
xdg.configFile."nvim/lua/parsers.lua".text = ''
|
||||||
|
vim.opt.runtimepath:append ("${treesitter-parsers}")
|
||||||
|
'';
|
||||||
|
|
||||||
|
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
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in a new issue