-
-
Notifications
You must be signed in to change notification settings - Fork 255
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
feat(syntax)!: reimplement the syntax highlighter #481
feat(syntax)!: reimplement the syntax highlighter #481
Conversation
4d74b52
to
c0f7432
Compare
Hiya there 👋 We actually merged in our code editor style guide a while ago to try and normalise the colours within all Catppuccin editors. While we can't expect every editor to follow the guideline set, we aim for it to be detailed enough for editors to implement well. I would encourage you to submit a PR against the main repository against that table as there are definitely improvements that can be made (e.g. we were having discussions on our discord about trying to standardise the search highlights) instead of just neovim as it will be more transparent for everyone to comment on before merging in improvements to all the editors Hope that's okay! @Jint-lzxy |
Yes, these highlights were removed in favor of lsp rule-based semantic in neovim/neovim@1cc23e1 |
Hi @sgoudham Sorry for the delay! I did notice the style guide last year, but at that time it was still a WIP. Glad to hear that it has been updated recently 👍
OK no probs - I will sort out a list of possible highlight categories based on |
Any progress for it? |
Sorry for my discontinued availability. I've created a PR at catppuccin/catppuccin#2109 😃 |
2310246
to
87b9ad3
Compare
d6a30d6
to
ff151e7
Compare
e49cda7
to
1f76a94
Compare
8c2dc65
to
3811fd8
Compare
I'm going to close this PR and open a new one that follows the updated standard captures (working on this right now lmao), bc nvim-treesitter/nvim-treesitter#5895 (and #630) have already been merged, and I kinda messed up the commit history 🙈 |
Initially proposed in ayamir/nvimdots#676 (comment). The goal of this PR is also described there :)
This PR updated copious highlight groups and added support for LSP Semantic Tokens. The following is a list of modified hl groups with reasons for such modifications. The hl groups marked as NS indicate I'm still on the fence about whether these changes should be implemented:
Search
fg: R(text, pink)
style: +B
CurSearch
to avoid confusion (things could get worse when using many highlights with different responsibilities).Added B for differentiation.
IncSearch
fg: R(mantle, surface1)
Search
Identifier
@variable
. It is widely used, so should have a trivial color.@variable
Identifier
)Label
Statement
,Label
)(The reason for not using the same color as the parent class is b/c they still have subtle semantic differences)
Keyword
I haven't figured out whether to use
red
ormaroon
yet. (Should avoid having the same color as@variable.builtin
)Exception
@exception
Include
Included
(which links toString
).Macro
Constant
?)Define
by default, macros are still constants, aren't they?StorageClass
Keyword
?)Type
, AFAIK many syntax highlighters tend to label that asKeyword
(also by definition):C++ Standard - §5.11 [lex.key]
Structure
Keyword
?)Structure
itself is not a valid type.Delimiter
Delimiter
has changed: "delimiters (e.g.;
/.
/,
)". Therefore, a suitable color was chosen for it.@function.macro
Constant
?)Constant
for the same reason asMacro
. But I'm not sure if it looks good in every language.@parameter
@keyword.operator
Operator
)@keyword.return
@variable.builtin
styles.properties
styles.properties
to indicate builtin types (same hereinafter)@constant.builtin
For example, in C++
nullptr
is a prvalue of typestd::nullptr_t
.@parameter
@type.qualifier
Constant
?)@field
@property
Identifier
. Assigned a trivial color.Diagnostics···Hint
DiagnosticsInfo
.