mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
fix: make additional_vim_regex_highlighting actually accept a list
This commit is contained in:
parent
091462592f
commit
e473630fe0
1 changed files with 4 additions and 1 deletions
|
|
@ -114,7 +114,10 @@ function M.attach(bufnr, lang)
|
|||
ts.highlighter.new(parser, {})
|
||||
|
||||
local is_table = type(config.additional_vim_regex_highlighting) == "table"
|
||||
if config.additional_vim_regex_highlighting and (not is_table or config.additional_vim_regex_highlighting[lang]) then
|
||||
if
|
||||
config.additional_vim_regex_highlighting
|
||||
and (not is_table or vim.tbl_contains(config.additional_vim_regex_highlighting, lang))
|
||||
then
|
||||
api.nvim_buf_set_option(bufnr, "syntax", "ON")
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue