fix(nvim): treesitter plugins not found
This commit is contained in:
parent
29cfce1111
commit
b5380bb2bb
1 changed files with 16 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
with builtins;
|
||||
{
|
||||
|
@ -115,9 +115,22 @@ with builtins;
|
|||
lazy = false;
|
||||
}
|
||||
{
|
||||
plugin = nvim-treesitter.withAllGrammars;
|
||||
plugin = nvim-treesitter;
|
||||
event = [ "BufReadPost" "BufNewFile" ];
|
||||
conf = readFile ./nvim-treesitter.lua;
|
||||
conf =
|
||||
let
|
||||
parserDir = pkgs.symlinkJoin {
|
||||
name = "tresitter-grammars-all";
|
||||
paths = lib.attrValues (lib.filterAttrs (_: builtins.isAttrs) nvim-treesitter-parsers);
|
||||
};
|
||||
in
|
||||
readFile ./nvim-treesitter.lua + ''
|
||||
vim.opt.runtimepath:append("${parserDir}")
|
||||
|
||||
require'nvim-treesitter.configs'.setup {
|
||||
parser_install_dir = "${parserDir}",
|
||||
}
|
||||
'';
|
||||
dependencies = [
|
||||
{ plugin = nvim-ts-context-commentstring; }
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue