Closed pwntester closed 2 years ago
Oh, just figured out this issue belongs to nvim-treesitter, not here. Thanks again!
Looking at the parsed elements, I miss:
list_marker_minus
)I feel like at least the first two should have their own elements. Is it possible to add them?
Good suggestions. For the fenced code block delimiters a current work around would be to set the whole code block to be TSPunctDelimiter
and setting the content to be TSLiteral
. The other two need extra nodes, I think it would also maybe be nicer to add nodes for the fenced code block delimiters as well.
Hi, I am trying to add the right highlights to a theme for Treesitter and wondered if anyone could advise me which to use for the following bold parts of the text? (they won't all render bold on GitHub, so I stuck them in a code block)
**#** Heading 1
**##** Heading 2
**###** Heading 3
**-** unordered list
**-** unordered list
**1.** ordered list
**2.** ordered list
!(**image**)[url]
**>** note
The details of the colors with screenshots are at: https://github.com/Mofiqul/vscode.nvim/pull/30
The highlights.scm
from this repository does not work with what you want to do, but you could easily write your own queries. If you're not familiar with tree-sitter queries you can look at the tree-sitter documentation for syntax highlighting.
With that said
atx_h1_marker
, atx_h2_marker
...list_marker_minus
, list_marker_plus
and list_marker_star
for unordered lists and list_marker_dot
and list_marker_parenthesis
for ordered lists.![**image**](url)
but you are probably looking for image_description
.>
can actually not be individually highlighted yet, that is part of this issueFor now, I submitted this PR to highlight link delimiters and frontmatter
Everything discussed here should be implemented now as far as I know (for now the closing )
are deactivated in nvim-treesitter because of an internal problem, see https://github.com/nvim-treesitter/nvim-treesitter/issues/2206).
Thanks for the awesome parser!
I have some suggestions that could improve the highlighting:
>
) should haveTSPunctSpecial
highlight groupTSLiteral
group, I think it would be better to useTSPunctDelimiter
[]()
) should useTSPunctDelimiter
orTSPunctBracket
highlight group_
and*
) should useTSPunctDelimiter
highlight groupThanks again!