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

Create file.md if file does not exist #28

Closed UNIVPM-S1079707 closed 1 month ago

UNIVPM-S1079707 commented 2 months ago

When following a local link, instead of opening foo.md if foo.md exists, open foo.md if foo doesn't exist.

I'm using glob instead of filereadable to allow matching directories, and path:sub(-3) ~= ".md" is there to prevent duplicate extensions (ex. foo.md being opened as foo.md.md).

jghauser commented 1 month ago

Thanks a lot (also for the other PRs)! :heart: