added nvim-treesitter-textobjects
This commit is contained in:
parent
bec752c6b7
commit
4dd3918382
26
init.lua
26
init.lua
@ -112,7 +112,31 @@ require'nvim-treesitter.configs'.setup {
|
||||
max_file_lines = nil, -- Do not enable for files with more than n lines, int
|
||||
-- colors = {}, -- table of hex strings
|
||||
-- termcolors = {} -- table of colour name strings
|
||||
}
|
||||
},
|
||||
textobjects = {
|
||||
select = {
|
||||
enable = true,
|
||||
|
||||
-- Automatically jump forward to textobj, similar to targets.vim
|
||||
lookahead = true,
|
||||
|
||||
keymaps = {
|
||||
-- You can use the capture groups defined in textobjects.scm
|
||||
["af"] = "@function.outer",
|
||||
["if"] = "@function.inner",
|
||||
["ac"] = "@class.outer",
|
||||
["ic"] = "@class.inner",
|
||||
},
|
||||
},
|
||||
lsp_interop = {
|
||||
enable = true,
|
||||
border = 'none',
|
||||
peek_definition_code = {
|
||||
["<leader>df"] = "@function.outer",
|
||||
["<leader>dF"] = "@class.outer",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
-------------------- LUASNIP -------------------------------
|
||||
require("luasnip.loaders.from_vscode").load()
|
||||
|
@ -58,4 +58,8 @@ return require('packer').startup(function()
|
||||
requires = "nvim-treesitter/nvim-treesitter"
|
||||
}
|
||||
use {'abecodes/tabout.nvim'}
|
||||
use {
|
||||
'nvim-treesitter/nvim-treesitter-textobjects',
|
||||
requires = "nvim-treesitter/nvim-treesitter"
|
||||
}
|
||||
end)
|
||||
|
Loading…
x
Reference in New Issue
Block a user