treesitter: runtime queries

Runtime queries just work like ftplugins, that is:

- Queries in the `after` directory are sourced _after_ the "base" query
- Otherwise, the last define query takes precedence.

Queries can be found in the `queries` directory.

Update runtime/lua/vim/treesitter/query.lua

Co-authored-by: Paul Burlumi <paul@burlumi.com>
This commit is contained in:
Thomas Vigouroux
2020-10-06 09:09:28 +02:00
parent b9776ff5b7
commit d3f544002c
4 changed files with 261 additions and 3 deletions

View File

@@ -56,7 +56,7 @@ TSHighlighter.hl_map = {
["include"] = "Include",
}
function TSHighlighter.new(query, bufnr, ft)
function TSHighlighter.new(bufnr, ft, query)
if bufnr == nil or bufnr == 0 then
bufnr = a.nvim_get_current_buf()
end