dotfiles/dot_config/nvim/after/plugin/treesitter.lua

36 lines
738 B
Lua

local ok, treesitter = pcall(require, 'nvim-treesitter.configs')
if not ok then
return
end
treesitter.setup {
textobjects = {
select = {
enable = true,
lookahead = true,
keymaps = {
['af'] = '@function.outer',
['if'] = '@function.inner',
['ac'] = '@class.outer',
['ic'] = '@class.inner',
}
},
},
ensure_installed = {
'javascript',
'typescript',
'css',
'json',
'c',
'lua',
'go'
},
sync_install = false,
auto_install = true,
highlight = {
enable = true,
additional_vim_regex_highlighting = false,
},
}