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
|
max_file_lines = nil, -- Do not enable for files with more than n lines, int
|
||||||
-- colors = {}, -- table of hex strings
|
-- colors = {}, -- table of hex strings
|
||||||
-- termcolors = {} -- table of colour name 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 -------------------------------
|
-------------------- LUASNIP -------------------------------
|
||||||
require("luasnip.loaders.from_vscode").load()
|
require("luasnip.loaders.from_vscode").load()
|
||||||
|
@ -58,4 +58,8 @@ return require('packer').startup(function()
|
|||||||
requires = "nvim-treesitter/nvim-treesitter"
|
requires = "nvim-treesitter/nvim-treesitter"
|
||||||
}
|
}
|
||||||
use {'abecodes/tabout.nvim'}
|
use {'abecodes/tabout.nvim'}
|
||||||
|
use {
|
||||||
|
'nvim-treesitter/nvim-treesitter-textobjects',
|
||||||
|
requires = "nvim-treesitter/nvim-treesitter"
|
||||||
|
}
|
||||||
end)
|
end)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user