jghauser / follow-md-links.nvim

Easily follow markdown links with this neovim plugin
GNU General Public License v3.0
143 stars 16 forks source link

feat: parse line numbers #24

Closed pyrho closed 3 months ago

pyrho commented 3 months ago

When trying to open a link to a file that also has a line number, e.g. path/to/file:42 these changes now allow to open the file and put the cursor on the corresponding line number.

Previously, open a file with a : and the line number would fail.

Additionally these changes use vim.fn.filereadable instead of fs_open/fs_stat, as the API is easier to use and (I think) it may be less costly than opening the file via fs_open.

Thanks for the plugin!

jghauser commented 3 months ago

Thanks a lot for the PR! :heart: This looks good to me!

jghauser commented 3 months ago

Oh, if you could add a line to the readme saying that the plugin handles line numbers, that would be great!

pyrho commented 3 months ago

Oops forgot about this, will create a new PR with this.