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.";
# };
};
config = lib.mkIf cfg.enable {
# Set nvim as manpager and default editor
home.sessionVariables = {
EDITOR = "nvim";
MANPAGER = "nvim +Man!";
};
programs.neovim =
config =
let
nvim-treesitter = pkgs.vimPlugins.nvim-treesitter;
treesitterWithGrammars = nvim-treesitter.withPlugins (_: nvim-treesitter.allGrammars);
@ -37,7 +30,18 @@ in
paths = treesitterWithGrammars.dependencies;
};
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;
coc.enable = false;
package = cfg.package;
@ -45,16 +49,6 @@ in
withPython3 = 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 = [
treesitterWithGrammars
];