mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-06 05:20:00 -04:00
fix(highlights): use new highlighter interface
This commit is contained in:
parent
3b7b4daadb
commit
06452845d6
1 changed files with 2 additions and 2 deletions
|
|
@ -78,7 +78,7 @@ hlmap["tag.delimiter"] = "TSTagDelimiter"
|
|||
hlmap["none"] = "TSNone"
|
||||
|
||||
function M.attach(bufnr, lang)
|
||||
local lang = lang or parsers.get_buf_lang(bufnr)
|
||||
local parser = parsers.get_parser(bufnr, lang)
|
||||
local config = configs.get_module('highlight')
|
||||
|
||||
for k, v in pairs(config.custom_captures) do
|
||||
|
|
@ -88,7 +88,7 @@ function M.attach(bufnr, lang)
|
|||
local query = queries.get_query(lang, "highlights")
|
||||
if not query then return end
|
||||
|
||||
M.highlighters[bufnr] = ts.highlighter.new(bufnr, lang, query)
|
||||
M.highlighters[bufnr] = ts.highlighter.new(parser, query)
|
||||
end
|
||||
|
||||
function M.detach(bufnr)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue