Closed gennaro-tedesco closed 3 months ago
Backticks are concealed by the nvim-treesitter here: https://github.com/nvim-treesitter/nvim-treesitter/blob/master/queries/markdown/highlights.scm#L50-L52
Do you override or extend highlights.scm
in any way?
Do you override or extend highlights.scm in any way?
No, I do not.
However, I noticed that the highlight group @markup.raw.block
does not exist (is not being created?). Shall I create it manually and then conceal it?
No, that shouldn't make any real difference.
Your color scheme should make these groups, @markup.raw.block
is an agreed upon naming convention: https://github.com/nvim-treesitter/nvim-treesitter/blob/master/CONTRIBUTING.md#highlights.
I looked at your treesitter config and found this line: https://github.com/gennaro-tedesco/dotfiles/blob/master/nvim/lua/plugins/treesitter.lua#L7
highlight = { enable = true, disable = { "markdown" } },
Concealing relies on treesitter highlights, they are disabled for markdown, hence concealing does not work for non inline elements like code blocks.
To fix this remove the disable
setting:
highlight = { enable = true },
While I wrote a healthcheck to validate that highlights were enabled, I did not account for someone explicitly disabling it for markdown
, that's a new one haha.
Updated the healthcheck to account for this: https://github.com/MeanderingProgrammer/markdown.nvim/commit/8d1452860e1c6b03d814af10024c7edc88e44963.
Feel free to re-open if the fix from the previous comment does not work.
You are perfectly right, quite silly of me to not check my treesitter options first. Thank you a lot for taking the time to even dig into my config for it, much appreciated.
Now it all works fine!
Neovim version (nvim -v)
Operating system
MacOs
Terminal emulator / GUI
iTerm
Describe the bug
More than a bug a request for clarification: I am running the plugin with default settings, however I cannot reproduce the visuals that appear in your demo screenshots, in particular concealing of backticks isn't show (the backticks still are).
See screenshot above: I have copied&pasted a portion of your README.md, expecting it to automatically render as in the gifs, however the concealing both for inline and block code isn't correct (or am I mistaken)?
Expected behavior
Backticks do not appear when concealed.
Healthcheck output (:checkhealth render-markdown)
Additional information
No response