Hi everyone!
Sorry for the duplicate post. I looked through all the others and still could not get to a solution.
As the title suggests, I am trying to configure neovim using flakes + home-manager to install plugins and lazy.nvim for the configuration according to this guide
Unfortunately, no treesitter parsers are working besides the default parsers. Running checkhealth nvim-treesitter shows that itβs working find, just canβt find the parsers installed by nix.
I know this is a lazy.nvim thing overwriting/pointing to incorrect paths maybe (or not to the path in the nix store at all for the parsers) because when I comment out the lazy related code, the treesitter parsers work fine:
{ pkgs, config, inputs, ... }:
{
programs.neovim = {
enable = true;
package = inputs.neovim-nightly-overlay.packages.${pkgs.system}.default;
vimAlias = true;
vimdiffAlias = true;
withNodeJs = true;
plugins = with pkgs.vimPlugins; [
lazy-nvim
nvim-treesitter
nvim-treesitter.withAllGrammars
plenary-nvim
nui-nvim
nvim-web-devicons
neo-tree-nvim
toggleterm-nvim
];
extraLuaConfig = ''
${builtins.readFile ./lua/config/init.lua}
require("lazy").setup({
spec = {
{ import = "plugins" },
},
}, {
performance = {
reset_packpath = false,
rtp = {
reset = false,
}
},
dev = {
path = "${pkgs.vimUtils.packDir config.programs.neovim.finalPackage.passthru.packpathDirs}/pack/myNeovimPackages/start",
patterns = {
"nvim-treesitter",
"akinsho",
"utilyre",
"SmiteshP",
"nvim-neo-tree",
},
},
install = {
missing = false,
},
})
require "nvim-treesitter.configs".setup {
-- Managed with nixos
auto_install = false,
highlight = {
enable = true
},
indent = {
enable = true
},
}
'';
};
xdg.configFile."nvim/lua" = {
recursive = true;
source = ./lua;
};
}
here is my treesitter.lua
return {
{
"nvim-treesitter/nvim-treesitter",
opts = {
auto_install = false,
ensure_installed = {},
},
},
}
.
βββ default.nix
βββ lua
βββ config
β βββ init.lua
β βββ keymaps.lua
β βββ options.lua
βββ plugins
βββ neo-tree.lua
βββ toggleterm.lua
βββ treesitter.lua
here is my repo, thank you in advance from a noob: repo