nvim-treesitter icon indicating copy to clipboard operation
nvim-treesitter copied to clipboard

feat(markdown_inline): Conceals for character escapes

Open ValdezFOmar opened this issue 1 year ago • 4 comments

ValdezFOmar avatar Jun 08 '24 01:06 ValdezFOmar

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 \$

ribru17 avatar Jun 08 '24 01:06 ribru17

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.

clason avatar Jun 08 '24 08:06 clason

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.

clason avatar Jun 09 '24 09:06 clason

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.

Done https://github.com/nvim-treesitter/nvim-treesitter/pull/6750

ValdezFOmar avatar Jun 10 '24 01:06 ValdezFOmar

Closing since I still think we need to be careful about default conceal; I'd prefer to leave this driven by upstream. Thanks, though!

clason avatar Jul 17 '24 15:07 clason