mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-03-28 12:21:54 +01:00
27 lines
598 B
Lua
27 lines
598 B
Lua
local config = {}
|
|
|
|
function config.nvim_treesitter()
|
|
vim.api.nvim_command('set foldmethod=expr')
|
|
vim.api.nvim_command('set foldexpr=nvim_treesitter#foldexpr()')
|
|
require('nvim-treesitter.configs').setup({
|
|
ensure_installed = 'all',
|
|
ignore_install = { 'phpdoc' },
|
|
highlight = {
|
|
enable = true,
|
|
},
|
|
textobjects = {
|
|
select = {
|
|
enable = true,
|
|
keymaps = {
|
|
['af'] = '@function.outer',
|
|
['if'] = '@function.inner',
|
|
['ac'] = '@class.outer',
|
|
['ic'] = '@class.inner',
|
|
},
|
|
},
|
|
},
|
|
})
|
|
end
|
|
|
|
return config
|