mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-08-26 13:04:01 +02:00
fix: neovim
This commit is contained in:
@@ -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
|
||||
@@ -0,0 +1,12 @@
|
||||
local package = require('core.pack').package
|
||||
local conf = require('modules.editor.config')
|
||||
|
||||
package({
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
event = 'BufRead',
|
||||
run = ':TSUpdate',
|
||||
config = conf.nvim_treesitter,
|
||||
dependencies = {
|
||||
'nvim-treesitter/nvim-treesitter-textobjects',
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user