-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Subscript highlighted as strikethrough #122
Comments
That's a limitation of using the treesitter markdown grammar also for quarto. You can overwrite the highlighting by taking the query file from https://github.com/nvim-treesitter/nvim-treesitter/blob/master/queries/markdown_inline/highlights.scm , adding it to your own config at (strikethrough) @markup.strikethrough with (strikethrough
(emphasis_delimiter)
(strikethrough
(emphasis_delimiter)
(emphasis_delimiter))
(emphasis_delimiter))@markup.strikethrough such that only double |
Can this be implemented only for quarto files. Like inside ftplugin. Also I saw this about overriding queries, but didn't understand properly where to put what: https://github.com/nvim-treesitter/nvim-treesitter?tab=readme-ov-file#adding-queries |
I got it to work half-way (see commit to my config linked above): On quarto files the window highlighting is overwritten such that strikethrough is no longer strikethrough and only the additional highlight group (should answer your question about where to put those) with two tildes is strikethrough. Caveat: The highlight group namespace is set per window, not per buffer i.e. if you open a markdown file in the same window as the quarto file it will get the same treatment. |
In quarto markdown format,
subscript~1~
creates subscript₁But in the syntax highlighting, is shown.
ref: https://quarto.org/docs/authoring/markdown-basics.html#text-formatting
The text was updated successfully, but these errors were encountered: