optional loading of htmldjango treesitter
This commit is contained in:
+16
-12
@@ -234,18 +234,22 @@ function M.nvim_treesitter()
|
|||||||
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
|
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
|
||||||
end
|
end
|
||||||
|
|
||||||
local parser_config = require("nvim-treesitter.parsers").get_parser_configs()
|
local htmldjango_path = "/home/guy/code/treesitter/tree-sitter-htmldjango-myown"
|
||||||
parser_config.htmldjango = {
|
|
||||||
install_info = {
|
if vim.fn.filereadable(htmldjango_path) then
|
||||||
url = "/home/guy/code/treesitter/tree-sitter-htmldjango-myown", -- local path or git repo
|
local parser_config = require("nvim-treesitter.parsers").get_parser_configs()
|
||||||
files = { "src/parser.c" },
|
parser_config.htmldjango = {
|
||||||
-- optional entries:
|
install_info = {
|
||||||
branch = "paired-tags", -- default branch in case of git repo if different from master
|
url = htmldjango_path, -- local path or git repo
|
||||||
--generate_requires_npm = false, -- if stand-alone parser without npm dependencies
|
files = { "src/parser.c" },
|
||||||
requires_generate_from_grammar = true, -- if folder contains pre-generated src/parser.c
|
-- optional entries:
|
||||||
},
|
branch = "paired-tags", -- default branch in case of git repo if different from master
|
||||||
filetype = "html", -- if filetype does not match the parser name
|
--generate_requires_npm = false, -- if stand-alone parser without npm dependencies
|
||||||
}
|
requires_generate_from_grammar = true, -- if folder contains pre-generated src/parser.c
|
||||||
|
},
|
||||||
|
filetype = "html", -- if filetype does not match the parser name
|
||||||
|
}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.nvim_lspconfig()
|
function M.nvim_lspconfig()
|
||||||
|
|||||||
Reference in New Issue
Block a user