neovim: no longer mangle init

This commit is contained in:
Zynh Ludwig 2024-07-22 00:48:31 -07:00
parent fe7ea07235
commit f8540d0e37

View file

@ -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
]; ];