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

36 lines
738 B
Lua
Raw Normal View History

2023-02-11 14:11:00 +01:00
local ok, treesitter = pcall(require, 'nvim-treesitter.configs')
if not ok then
return
end
treesitter.setup {
2023-02-24 07:31:04 +01:00
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'
},
2023-02-11 14:11:00 +01:00
sync_install = false,
auto_install = true,
highlight = {
enable = true,
additional_vim_regex_highlighting = false,
},
}