blob: 1c36088dbbe0732b215a61c83feb91752615e134 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
lua <<EOF
local parser_config = require("nvim-treesitter.parsers").get_parser_configs()
-- Resolve the grammar directory relative to this plugin file so it works
-- regardless of the current working directory or checkout location.
local plugin_dir = vim.fs.dirname(debug.getinfo(1, "S").source:sub(2))
local grammar_dir = vim.fs.normalize(vim.fs.joinpath(plugin_dir, "..", "treesitter"))
parser_config.fiddle = {
install_info = {
url = grammar_dir,
files = { "src/parser.c" },
generate_requires_npm = true,
requires_generate_from_grammar = true,
},
filetype = "fiddle",
}
EOF
|