feat: Allow to configure to use syntax and tree-sitter together

This commit is contained in:
Stephan Seitz
2021-03-17 13:08:29 +01:00
committed by Stephan Seitz
parent 5c00f8ede1
commit ff9bf6dc2b
2 changed files with 5 additions and 1 deletions

View File

@@ -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',

View File

@@ -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)