aboutsummaryrefslogtreecommitdiff
path: root/runtime/plugin/nvim.lua
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2022-12-17 13:43:46 +0100
committerGitHub <noreply@github.com>2022-12-17 13:43:46 +0100
commit1c4794944deb734b24b4a424c50b766a96e050dd (patch)
treee1ccf4ccce199b19e1b98d2c6b2cc179a1fa25c1 /runtime/plugin/nvim.lua
parentd65684f0c755a9341412423543b65ec872196440 (diff)
parentef91146efcece1b6d97152251e7137d301146189 (diff)
downloadrneovim-1c4794944deb734b24b4a424c50b766a96e050dd.tar.gz
rneovim-1c4794944deb734b24b4a424c50b766a96e050dd.tar.bz2
rneovim-1c4794944deb734b24b4a424c50b766a96e050dd.zip
Merge pull request #21393 from folke/highlight_show
feat(lsp): add function to get semantic tokens at cursor feat: `vim.inspect_pos()`, `vim.show_pos()` and `:Inspect[!]`
Diffstat (limited to 'runtime/plugin/nvim.lua')
-rw-r--r--runtime/plugin/nvim.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/runtime/plugin/nvim.lua b/runtime/plugin/nvim.lua
new file mode 100644
index 0000000000..815886f896
--- /dev/null
+++ b/runtime/plugin/nvim.lua
@@ -0,0 +1,7 @@
+vim.api.nvim_create_user_command('Inspect', function(cmd)
+ if cmd.bang then
+ vim.pretty_print(vim.inspect_pos())
+ else
+ vim.show_pos()
+ end
+end, { desc = 'Inspect highlights and extmarks at the cursor', bang = true })