nvim-treesitter / nvim-tree-docs

Code documentation built with treesitter
223 stars 10 forks source link

Feature Request - Vim Command #2

Open weilbith opened 3 years ago

weilbith commented 3 years ago

Hey, :wave: Just stumbled over this plugin and it looks pretty cool/powerful. I must admit that I dislike to set key mappings via a setup function of a plugin. Happily other treesitter plugins have added a Vim command. Or at least there is a "direct" Lua function available that could be bound. But for this plugin I don't understand the internals and how to do a manual mapping. Could you help me? Or eventually add commands for these possible mappings? :upside_down_face:

steelsojka commented 3 years ago

you can call the lua methods that produce the results from the prebuilt mappings. The most common one is require "nvim-tree-docs.internal".doc_node_at_cursor(). I will look at exposing commands.

Note, this plugin is in some flex due to the rapid development of treesitter in neovim. I'm using it daily, but there MAY be times when it may be broken.