aboutsummaryrefslogtreecommitdiff
path: root/runtime/plugin/nvim.lua
blob: 762e9519db104e8fe57af0b8ef24483d37de30a7 (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.pretty_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' })