mirror of
https://github.com/pnx/dotfiles
synced 2026-06-16 03:14:55 +02:00
nvim/lua/user/plugins/editor/treesitter.lua: remove textobjects
This commit is contained in:
parent
7b9b80ac09
commit
d20b270825
1 changed files with 0 additions and 54 deletions
|
|
@ -4,9 +4,6 @@ return {
|
||||||
build = function()
|
build = function()
|
||||||
require("nvim-treesitter.install").update({ with_sync = true })
|
require("nvim-treesitter.install").update({ with_sync = true })
|
||||||
end,
|
end,
|
||||||
dependencies = {
|
|
||||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
|
||||||
},
|
|
||||||
opts_extend = { "ensure_installed" },
|
opts_extend = { "ensure_installed" },
|
||||||
opts = {
|
opts = {
|
||||||
-- Default parsers.
|
-- Default parsers.
|
||||||
|
|
@ -35,57 +32,6 @@ return {
|
||||||
indent = {
|
indent = {
|
||||||
enable = true,
|
enable = true,
|
||||||
},
|
},
|
||||||
|
|
||||||
textobjects = {
|
|
||||||
select = {
|
|
||||||
enable = true,
|
|
||||||
lookahead = true,
|
|
||||||
keymaps = {
|
|
||||||
-- Functions/Methods
|
|
||||||
["af"] = { query = "@function.outer", desc = "outer function" },
|
|
||||||
["if"] = { query = "@function.inner", desc = "inner function" },
|
|
||||||
-- Class
|
|
||||||
["ac"] = { query = "@class.outer", desc = "around class" },
|
|
||||||
["ic"] = { query = "@class.inner", desc = "inner class" },
|
|
||||||
-- Parameters/arguments
|
|
||||||
["av"] = { query = "@parameter.outer", desc = "around parameter" },
|
|
||||||
["iv"] = { query = "@parameter.inner", desc = "inner parameter" },
|
|
||||||
}
|
|
||||||
},
|
|
||||||
swap = {
|
|
||||||
enable = true,
|
|
||||||
swap_next = {
|
|
||||||
["<leader>]"] = { query = "@parameter.inner", desc = "Swap next parameter with the one under cursor" },
|
|
||||||
},
|
|
||||||
swap_previous = {
|
|
||||||
["<leader>["] = { query = "@parameter.inner", desc = "Swap previous parameter with the one under cursor" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
move = {
|
|
||||||
enable = true,
|
|
||||||
set_jumps = true,
|
|
||||||
goto_next_start = {
|
|
||||||
["]f"] = { query = "@function.outer", desc = "Goto the beginning of the next function" },
|
|
||||||
["]c"] = { query = "@class.outer", desc = "Goto the beginning of the next class" },
|
|
||||||
["]v"] = { query = "@parameter.inner", desc = "Goto the beginning of the next parameter" },
|
|
||||||
},
|
|
||||||
goto_next_end = {
|
|
||||||
["]F"] = { query = "@function.outer", desc = "Goto the end of the next function" },
|
|
||||||
["]C"] = { query = "@class.outer", desc = "Goto the end of the next class" },
|
|
||||||
["]V"] = { query = "@parameter.inner", desc = "Goto the end of the next parameter" },
|
|
||||||
},
|
|
||||||
goto_previous_start = {
|
|
||||||
["[f"] = { query = "@function.outer", desc = "Goto the beginning of the previous function" },
|
|
||||||
["[c"] = { query = "@class.outer", desc = "Goto the beginning of the previous class" },
|
|
||||||
["[v"] = { query = "@parameter.inner", desc = "Goto the beginning of the previous parameter" },
|
|
||||||
},
|
|
||||||
goto_previous_end = {
|
|
||||||
["[F"] = { query = "@function.outer", desc = "Goto the end of the previous function" },
|
|
||||||
["[C"] = { query = "@class.outer", desc = "Goto the end of the previous class" },
|
|
||||||
["[V"] = { query = "@parameter.inner", desc = "Goto the end of the previous parameter" },
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
local parser_config = require("nvim-treesitter.parsers").get_parser_configs()
|
local parser_config = require("nvim-treesitter.parsers").get_parser_configs()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue