This commit is contained in:
Henrik Bakken
2023-04-03 00:21:42 +02:00
parent 54f9768e9b
commit 8cd434636f
+9 -20
View File
@@ -412,29 +412,18 @@ require("lazy").setup({
end, end,
}, },
{ {
"kiyoon/treesitter-indent-object.nvim", "RRethy/nvim-treesitter-textsubjects",
dependencies = { "nvim-treesitter/nvim-treesitter" },
config = function() config = function()
require("treesitter_indent_object").setup({}) require("nvim-treesitter.configs").setup({
end, textsubjects = {
keys = { enable = true,
{ prev_selection = ",",
"ai", keymaps = {
function() ["."] = "textsubjects-smart",
require("treesitter_indent_object.textobj").select_indent_outer()
end,
mode = { "x", "o" },
desc = "Select context-aware indent (outer)",
},
{
"ii",
function()
require("treesitter_indent_object.textobj").select_indent_inner()
end,
mode = { "x", "o" },
desc = "Select context-aware indent (inner, partial range)",
}, },
}, },
})
end,
}, },
{ -- context while scrolling { -- context while scrolling
"romgrk/nvim-treesitter-context", "romgrk/nvim-treesitter-context",