neovim: no longer mangle init

main
Zynh Ludwig 2024-07-22 00:48:31 -07:00
parent fe7ea07235
commit f8540d0e37
1 changed files with 21 additions and 27 deletions

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