aboutsummaryrefslogtreecommitdiff
path: root/runtime/plugin/nvim.lua
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2023-03-02 18:03:11 +0100
committerGitHub <noreply@github.com>2023-03-02 18:03:11 +0100
commitf449121764c19cebda7b8b2c970b76bc8121bae7 (patch)
treec0f66adf0c9fc04b259d7c4831959a910f92ac90 /runtime/plugin/nvim.lua
parentb0b4c310973c2b419350e3c05c772596b1c334e9 (diff)
downloadrneovim-f449121764c19cebda7b8b2c970b76bc8121bae7.tar.gz
rneovim-f449121764c19cebda7b8b2c970b76bc8121bae7.tar.bz2
rneovim-f449121764c19cebda7b8b2c970b76bc8121bae7.zip
feat(treesitter): add :InspectTree command (#22477)
Diffstat (limited to 'runtime/plugin/nvim.lua')
-rw-r--r--runtime/plugin/nvim.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/runtime/plugin/nvim.lua b/runtime/plugin/nvim.lua
index 815886f896..762e9519db 100644
--- a/runtime/plugin/nvim.lua
+++ b/runtime/plugin/nvim.lua
@@ -5,3 +5,7 @@ vim.api.nvim_create_user_command('Inspect', function(cmd)
vim.show_pos()
end
end, { desc = 'Inspect highlights and extmarks at the cursor', bang = true })
+
+vim.api.nvim_create_user_command('InspectTree', function()
+ vim.treesitter.inspect_tree()
+end, { desc = 'Inspect treesitter language tree for buffer' })