Skip to content
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

Cleanly align highlight groups with new, standardized treesitter highlight captures #217

Open
camoz opened this issue Apr 26, 2024 · 0 comments

Comments

@camoz
Copy link

camoz commented Apr 26, 2024

There are some mistakes in #201, e.g. @markup.emphasis and @markup.strike do not exist upstream, they are called @markup.italic and @markup.strikethrough instead (this causes treesitter-based markdown highlighting to not work correctly currently, i.e. italics and strikethrough are not applied).

The new, standardized treesitter highlight captures seem to be stable now: nvim-treesitter/nvim-treesitter#6513

But there are quite some differences between the onedark highlight groups and the nvim-treesitter captures listed here: https://github.com/nvim-treesitter/nvim-treesitter/blob/master/CONTRIBUTING.md#highlights

Maybe it would be worth to cleanly align with upstream?

Diff between onedark and nvim-treesitter captures
merlin@mx230:~/downloads$ diff onedark-captures.txt nvim-treesitter-captures.txt 
1d0
< @annotation
3c2
< @attribute.typescript
---
> @attribute.builtin
5a5
> @character.special
6a7,9
> @comment.documentation
> @comment.error
> @comment.note
8,9c11,12
< @comment.todo.checked
< @comment.todo.unchecked
---
> @comment.warning
> @conceal
14,17d16
< @danger
< @diff.add
< @diff.delete
< @error
19a19
> @function.call
21a22
> @function.method.call
23a25,27
> @keyword.conditional.ternary
> @keyword.coroutine
> @keyword.debug
24a29
> @keyword.directive.define
27a33
> @keyword.modifier
29a36,37
> @keyword.return
> @keyword.type
31,32d38
< @markup.environment
< @markup.environment.name
34,45c40,45
< @markup.heading.1.markdown
< @markup.heading.1.marker.markdown
< @markup.heading.2.markdown
< @markup.heading.2.marker.markdown
< @markup.heading.3.markdown
< @markup.heading.3.marker.markdown
< @markup.heading.4.markdown
< @markup.heading.4.marker.markdown
< @markup.heading.5.markdown
< @markup.heading.5.marker.markdown
< @markup.heading.6.markdown
< @markup.heading.6.marker.markdown
---
> @markup.heading.1
> @markup.heading.2
> @markup.heading.3
> @markup.heading.4
> @markup.heading.5
> @markup.heading.6
47a48
> @markup.link.label
49a51,52
> @markup.list.checked
> @markup.list.unchecked
50a54
> @markup.quote
51a56
> @markup.raw.block
55a61
> @module.builtin
57c63
< @note
---
> @nospell
61d66
< @parameter.reference
64a70,71
> @punctuation.special
> @spell
65a73
> @string.documentation
67a76,77
> @string.special
> @string.special.path
69,72c79
< @tag
< @tag.attribute
< @tag.delimiter
< @text
---
> @string.special.url
74a82
> @type.definition
79,80c87
< @warning
< 
---
> @variable.parameter.builtin

nvim-treesitter-captures.txt
onedark-captures.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant