artempyanykh / marksman

Write Markdown with code assist and intelligence in the comfort of your favourite editor.
MIT License
1.98k stars 35 forks source link

Add support for (multi-line) footnotes #292

Open shaksiper opened 8 months ago

shaksiper commented 8 months ago

When the foot note is not a singular word [^word] (non-space), it behave as intended with working LSP actions such as rename, go to definition etc. However, when the foot note is a text with space, it will not work as a foot note, LSP actions, highlighting etc will not work for that foot note.

Example text: [^word]: I suspect that it is treated as a regular link

Testing paragraph [^test-note] with footer note [^test-note2]

[^test-note2]: Footer
[^test-note]: Footer note

Screenshot_20240124_155140

Environment details:

❯ nvim -v
NVIM v0.10.0-dev-2185+gae3eed53d
Build type: RelWithDebInfo
LuaJIT 2.1.1706032906
Run "nvim -V1 -v" for more info
❯ marksman --version
1.0.0-f124c56+f124c5616cf38241e1a5e58808ed78e2d9a1d385
artempyanykh commented 8 months ago

Thanks for reporting this @shaksiper! IIRC footnotes are not part of CommonMark standard for Markdown. With that said I want to have support for proper multiline footnotes, just didn't get around to adding it.

The fact that 'single-line' footnotes work now has to do with the fact that they are treated as reference definitions.