neovim / tree-sitter-vimdoc

Tree-sitter parser for Vim help files
Apache License 2.0
103 stars 13 forks source link

Tags with a dot "." beforehand isn't handled correctly #66

Closed dundargoc closed 1 year ago

dundargoc commented 1 year ago

The following doesn't conceal "|": vim.api.|nvim_get_keymap()|

clason commented 1 year ago

Workaround: use backticks for the first part:

`vim.api.`|nvim_get_keymap()|
justinmk commented 1 year ago

tangentially, I would discourage this kind of thing in help files. |nvim_get_keymap()| should be enough, it's noisy to spell out everywhere how to use things from Lua/Vimscript/this/that.

clason commented 1 year ago

(Just for the record, in case others read this: The context for this issue was the Lua guide, where "how to use things from Lua" was the whole point.)

justinmk commented 1 year ago

Backticks (codespan) are the escape-hatch in 99% of cases.

Marking this as wontfix because the parser cannot know if a | in the middle of an unbroken token is a tag or some other random vimdoc text.