JoosepAlviste / nvim-ts-context-commentstring

Neovim treesitter plugin for setting the commentstring based on the cursor location in a file.
MIT License
1.13k stars 34 forks source link

docs: fix link to minimal_init.lua example #76

Closed seanbreckenridge closed 11 months ago

seanbreckenridge commented 11 months ago

Clicking the utils/minimal_init.lua link in the README when on the homepage https://github.com/JoosepAlviste/nvim-ts-context-commentstring takes me to a 404: https://github.com/JoosepAlviste/utils/minimal_init.lua, instead of the lua file.

This adds ./ before the filename so it links properly

JoosepAlviste commented 11 months ago

Hey! This actually was like this before and was still broken: https://github.com/JoosepAlviste/nvim-ts-context-commentstring/pull/74

To be honest, I don't know what a correct fix would be 😅

seanbreckenridge commented 11 months ago

Ah hm...

I think this has to do with whether or not youre viewing README.md directly like:

https://github.com/JoosepAlviste/nvim-ts-context-commentstring/blob/main/README.md

Or just viewing it when on the homepage:

https://github.com/JoosepAlviste/nvim-ts-context-commentstring/

The change that was made in #74 makes it work when youre viewing the README.md, this makes it work on the homepage (which I think would be more common)

Alternatively, I could change this to just link to the full URL (https://github.com/JoosepAlviste/nvim-ts-context-commentstring/blob/main/utils/minimal_init.lua) which would prevent any of this confusion

seanbreckenridge commented 11 months ago

Changed it to the full URL instead of a relative path, that way it always works

JoosepAlviste commented 11 months ago

It probably makes sense to have the full URL indeed. I remember that the link used to work fine with ./ in all cases. Maybe GitHub changed their link Markdown rendering logic at some point?

Anyways, thanks for the contribution!