mirror of
https://github.com/chenasraf/nvim-treesitter.git
synced 2026-05-18 01:39:00 +00:00
feat: Allow to configure to use syntax and tree-sitter together
This commit is contained in:
committed by
Stephan Seitz
parent
5c00f8ede1
commit
ff9bf6dc2b
@@ -22,7 +22,8 @@ local builtin_modules = {
|
||||
enable = false,
|
||||
disable = {'markdown'}, -- FIXME(vigoux): markdown highlighting breaks everything for now
|
||||
custom_captures = {},
|
||||
is_supported = queries.has_highlights
|
||||
is_supported = queries.has_highlights,
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
incremental_selection = {
|
||||
module_path = 'nvim-treesitter.incremental_selection',
|
||||
|
||||
@@ -104,6 +104,9 @@ function M.attach(bufnr, lang)
|
||||
end
|
||||
|
||||
ts.highlighter.new(parser, {})
|
||||
if config.additional_vim_regex_highlighting then
|
||||
api.nvim_buf_set_option(bufnr, 'syntax', 'ON')
|
||||
end
|
||||
end
|
||||
|
||||
function M.detach(bufnr)
|
||||
|
||||
Reference in New Issue
Block a user