nvim-tree.lua
nvim-tree.lua copied to clipboard
docs: Bring in line with standard documentation
Amazing!
By standard documentation here, I mean the style in which the Vim options descriptions are formatted.
I decided to rewrite the documentation when I installed the nvim-tree myself and found its documentations unusable. All default values are in very huge table, which is marked up as "code" and all options descriptions underneath and options names are vim-help links without destination. So I made the default values also be the table of content, to allow user immediately jump to particular option description while scanning with eyes the table with defaults. The default value and Vim help tag separated with Lua comment sign: --
, sou you can copy any line into your Neovim config file, and it doesn't cause an error.
To create the script to make such formatting with sed is a lot of work that not worth it. And the result of the script will never be like manually tailored. I have already done most of the work, so to maintain the existing docs won't be much work, since I doubt, that you will frequently change all options names and descriptions.
To create the script to make such formatting with sed is a lot of work that not worth it. And the result of the script will never be like manually tailored. I have already done most of the work, so to maintain the existing docs won't be much work, since I doubt, that you will frequently change all options names and descriptions.
The script is already present. It updates nvim-tree-setup
and nvim-tree-default-mappings
. Updating this script for the new documentation is not optional.
The comments may be added to DEFAULT_OPTS
in nvim-tree.lua
@anuvyklack have you made any progress? The script should be simple to fix; it just requires updating the markers in the help file that the script uses.
@gegoune @kyazdani42 how do you feel about this one? The author will not fix update-help.sh
however it should be simple for us.
I am happy to reject this one; the current doc is fine and these "standards" are arbitrary.
I would be happy to make it its way in. Maybe someone else will pick it up? I could see if I could amend the script, maybe with some guidance?
I would be happy to make it its way in. Maybe someone else will pick it up? I could see if I could amend the script, maybe with some guidance?
It should be simple; update-help.sh
expects some markers which were deleted.
Default mappings text:
https://github.com/kyazdani42/nvim-tree.lua/blob/master/doc/nvim-tree-lua.txt#L1202
https://github.com/kyazdani42/nvim-tree.lua/blob/master/doc/nvim-tree-lua.txt#L1254
Default mappings lua:
https://github.com/kyazdani42/nvim-tree.lua/blob/master/doc/nvim-tree-lua.txt#L1255
https://github.com/kyazdani42/nvim-tree.lua/blob/master/doc/nvim-tree-lua.txt#L1255
Default options lua:
https://github.com/kyazdani42/nvim-tree.lua/blob/master/doc/nvim-tree-lua.txt#L167
https://github.com/kyazdani42/nvim-tree.lua/blob/master/doc/nvim-tree-lua.txt#L373
The author did not make any attempt to understand and instead chose to argue about it.
RE links after options auto_reload_on_write = true, -- |nvim-tree.auto_reload_on_write|
they should go in nvim-tree.lua to be scraped.
Once again, author made no attempt to understand.
These changes do require some attention e.g. the removal of the links such as :NvimTreeRefresh
.
I did not fully review these changes as I found the author to be very difficult to communicate with.
@anuvyklack Would you be willing to continue your work on this PR given @alex-courtis' effort describing remaining required changes?
If not, I should perhaps have some free time to look into it in a week or two.