nvim-tree.lua icon indicating copy to clipboard operation
nvim-tree.lua copied to clipboard

docs: Bring in line with standard documentation

Open anuvyklack opened this issue 1 year ago • 5 comments

anuvyklack avatar Aug 09 '22 11:08 anuvyklack

Amazing!

gegoune avatar Aug 09 '22 11:08 gegoune

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.

anuvyklack avatar Aug 14 '22 18:08 anuvyklack

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

alex-courtis avatar Aug 15 '22 01:08 alex-courtis

@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.

alex-courtis avatar Aug 22 '22 02:08 alex-courtis

@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.

alex-courtis avatar Sep 10 '22 02:09 alex-courtis

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?

gegoune avatar Sep 22 '22 04:09 gegoune

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.

alex-courtis avatar Sep 22 '22 05:09 alex-courtis

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.

alex-courtis avatar Sep 22 '22 05:09 alex-courtis

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.

alex-courtis avatar Sep 22 '22 05:09 alex-courtis

@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.

gegoune avatar Sep 23 '22 11:09 gegoune