From 3e13941eae69ab031ba3181bd0badc2d6304a8ac Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sat, 15 Jun 2024 19:26:42 +0200 Subject: [PATCH] nvim: Add mappings for inspecting treesitter Simply invokes the `:Inspect` and `:InspectTree` commands, to have quicker access, especially while tinkering with TS for the foreseeable future. --- nvim/.config/nvim/lua/plugins/treesitter.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nvim/.config/nvim/lua/plugins/treesitter.lua b/nvim/.config/nvim/lua/plugins/treesitter.lua index 5db7903..18e2e53 100644 --- a/nvim/.config/nvim/lua/plugins/treesitter.lua +++ b/nvim/.config/nvim/lua/plugins/treesitter.lua @@ -79,6 +79,10 @@ return { "TSUpdate", "TSUpdateSync", }, + keys = { + { "si", "Inspect", desc = "treesitter element", silent = true }, + { "sI", "InspectTree", desc = "treesitter tree", silent = true }, + }, -- show current cursor context at top of buffer -- improves commenting plugin above by using ts