mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-27 10:26:58 +02:00
fix: neovim
This commit is contained in:
26
home/base/desktop/neovim/lua/modules/editor/config.lua
Normal file
26
home/base/desktop/neovim/lua/modules/editor/config.lua
Normal file
@@ -0,0 +1,26 @@
|
||||
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
|
||||
Reference in New Issue
Block a user