aboutsummaryrefslogtreecommitdiff
path: root/runtime/plugin
diff options
context:
space:
mode:
authorFolke Lemaitre <folke.lemaitre@gmail.com>2022-12-14 10:46:54 +0100
committerFolke Lemaitre <folke.lemaitre@gmail.com>2022-12-17 13:05:31 +0100
commitef91146efcece1b6d97152251e7137d301146189 (patch)
tree6897f68a62dca4b8611a1acc90037e56d01babc4 /runtime/plugin
parent04da0432446fac57e391c31bd4de0a9c06b1626d (diff)
downloadrneovim-ef91146efcece1b6d97152251e7137d301146189.tar.gz
rneovim-ef91146efcece1b6d97152251e7137d301146189.tar.bz2
rneovim-ef91146efcece1b6d97152251e7137d301146189.zip
feat: `vim.inspect_pos`, `vim.show_pos`, `:Inspect`
Diffstat (limited to 'runtime/plugin')
-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 })