nvim-treesitter
nvim-treesitter copied to clipboard
feat(markdown_inline): Conceals for character escapes
I think you could change all of the paragraphs to
((backslash_escape) @string.escape
(#offset! @string.escape 0 0 0 -1)
(#set! conceal ""))
This also fixes the fact that the current queries are missing some other possible escape sequences, like \$
To be honest, I'm not sure we want this (but also not sure yet we don't). The issue is that the markdown parser is used by Neovim as a renderer for LSP documentation, and it seems to me that such strings are something you would want to see literally (for -- manual -- copy&pasting). Unfortunately, conceal is all-or-nothing and already used for rendering, so we can't play the "just don't enable conceal" card here.
Also, can you pull out the unrelated changes to a separate PR? The @nospell for link_label is also debatable, as the label often is normal text that should be spell-checked.
Also, can you pull out the unrelated changes to a separate PR? The
@nospellforlink_labelis also debatable, as the label often is normal text that should be spell-checked.
Done https://github.com/nvim-treesitter/nvim-treesitter/pull/6750
Closing since I still think we need to be careful about default conceal; I'd prefer to leave this driven by upstream. Thanks, though!