Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: improve tree-sitter
Browse files Browse the repository at this point in the history
ojsef39 committed Nov 10, 2024
1 parent 5b92e7c commit 3836a34
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion hosts/shared/programs/editor/default.nix
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@ let
baseName = baseNameOf path;
in baseName != "lazy-lock.json";
};
treeSitterWithAllGrammars = pkgs.vimPlugins.nvim-treesitter.withPlugins (plugins: pkgs.tree-sitter.allGrammars);
in
{
# Packages used in nvim but also outside of it
@@ -25,11 +26,14 @@ in
vimAlias = lib.mkDefault true;
withNodeJs = lib.mkDefault true;

plugins = [
treeSitterWithAllGrammars
];

# Packages used in nvim
extraPackages = with pkgs; [
fd
nodejs
tree-sitter

# LSP
vimPlugins.vim-prettier
@@ -75,4 +79,10 @@ in
'';
};
};
# Treesitter is configured as a locally developed module in lazy.nvim
# we hardcode a symlink here so that we can refer to it in our lazy config
".local/share/nvim/nix/nvim-treesitter/" = {
recursive = true;
source = treeSitterWithAllGrammars;
};
}

0 comments on commit 3836a34

Please sign in to comment.