mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-11 07:50:07 -04:00
feat: Allow to configure to use syntax and tree-sitter together
This commit is contained in:
parent
5c00f8ede1
commit
ff9bf6dc2b
2 changed files with 5 additions and 1 deletions
|
|
@ -22,7 +22,8 @@ local builtin_modules = {
|
||||||
enable = false,
|
enable = false,
|
||||||
disable = {'markdown'}, -- FIXME(vigoux): markdown highlighting breaks everything for now
|
disable = {'markdown'}, -- FIXME(vigoux): markdown highlighting breaks everything for now
|
||||||
custom_captures = {},
|
custom_captures = {},
|
||||||
is_supported = queries.has_highlights
|
is_supported = queries.has_highlights,
|
||||||
|
additional_vim_regex_highlighting = false,
|
||||||
},
|
},
|
||||||
incremental_selection = {
|
incremental_selection = {
|
||||||
module_path = 'nvim-treesitter.incremental_selection',
|
module_path = 'nvim-treesitter.incremental_selection',
|
||||||
|
|
|
||||||
|
|
@ -104,6 +104,9 @@ function M.attach(bufnr, lang)
|
||||||
end
|
end
|
||||||
|
|
||||||
ts.highlighter.new(parser, {})
|
ts.highlighter.new(parser, {})
|
||||||
|
if config.additional_vim_regex_highlighting then
|
||||||
|
api.nvim_buf_set_option(bufnr, 'syntax', 'ON')
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.detach(bufnr)
|
function M.detach(bufnr)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue