aboutsummaryrefslogtreecommitdiff
path: root/runtime/plugin/nvim.lua
blob: e4b099f7adceb93673f97a370c17efd1d9774c9c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
vim.api.nvim_create_user_command('Inspect', function(cmd)
  if cmd.bang then
    vim.print(vim.inspect_pos())
  else
    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' })