nvim: add treesitter textobjcets
This commit is contained in:
@ -77,6 +77,13 @@ require("packer").startup(function()
|
||||
end,
|
||||
})
|
||||
|
||||
use({
|
||||
"RRethy/nvim-treesitter-textsubjects",
|
||||
config = function()
|
||||
require("plugins.treesitter-textobjects")
|
||||
end,
|
||||
})
|
||||
|
||||
-- formatter
|
||||
use({
|
||||
"mhartington/formatter.nvim",
|
||||
|
||||
11
.config/nvim/lua/plugins/treesitter-textobjects.lua
Normal file
11
.config/nvim/lua/plugins/treesitter-textobjects.lua
Normal file
@ -0,0 +1,11 @@
|
||||
require("nvim-treesitter.configs").setup({
|
||||
textsubjects = {
|
||||
enable = true,
|
||||
prev_selection = ",", -- (Optional) keymap to select the previous selection
|
||||
keymaps = {
|
||||
["."] = "textsubjects-smart",
|
||||
[";"] = "textsubjects-container-outer",
|
||||
["i;"] = "textsubjects-container-inner",
|
||||
},
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user