-
Notifications
You must be signed in to change notification settings - Fork 529
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
Add Dart highlighting support #229
base: main
Are you sure you want to change the base?
Conversation
Implements #226.
The colors do look like expected 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Akin909 @l0nax After correlating with https://github.com/dart-lang/dart-vim-plugin/blob/master/syntax/dart.vim, onedark.vim
actually has default highlighting for basically all groups in this PR, so I think the PR is almost entirely redundant.
All highlight link
s also appear to be redundant, since they're already all defined in https://github.com/dart-lang/dart-vim-plugin/blob/master/syntax/dart.vim.
@@ -297,6 +297,17 @@ call s:h("cssSelectorOp", { "fg": s:purple }) | |||
call s:h("cssSelectorOp2", { "fg": s:purple }) | |||
call s:h("cssTagName", { "fg": s:red }) | |||
|
|||
" Dart | |||
call s:h("dartTypeDef", { "fg": s:red }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dartTypeDef
points to Typedef
which already has highlighting in onedark.vim
@@ -297,6 +297,17 @@ call s:h("cssSelectorOp", { "fg": s:purple }) | |||
call s:h("cssSelectorOp2", { "fg": s:purple }) | |||
call s:h("cssTagName", { "fg": s:red }) | |||
|
|||
" Dart | |||
call s:h("dartTypeDef", { "fg": s:red }) | |||
call s:h("dartClassDecl", { "fg": s:red }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dartClassDecl
points to dartStorageClass
which points to StorageClass
, which already has highlighting in onedark.vim, so the first two are redundant
call s:h("dartInterpolation", { "fg": s:blue }) | ||
highlight link dartLibrary Include | ||
call s:h("dartSdkClass", { "fg": s:cyan }) | ||
call s:h("dartStorageClass", { "fg": s:dark_red }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See dartClassDecl
.
" Dart | ||
call s:h("dartTypeDef", { "fg": s:red }) | ||
call s:h("dartClassDecl", { "fg": s:red }) | ||
call s:h("dartInterpolation", { "fg": s:blue }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dartInterpolation
points to PreProc
, which already has highlighting in onedark.vim
call s:h("dartClassDecl", { "fg": s:red }) | ||
call s:h("dartInterpolation", { "fg": s:blue }) | ||
highlight link dartLibrary Include | ||
call s:h("dartSdkClass", { "fg": s:cyan }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dartSdkClass
points to dartType
which points to Type
, which already has highlighting in onedark.vim
call s:h("dartStorageClass", { "fg": s:dark_red }) | ||
highlight link dartExceptions Exception | ||
highlight link dartStatement Statement | ||
call s:h("dartConstant", { "fg": s:dark_yellow }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dartConstant
points to Constant
, which already has highlighting in onedark.vim
Then why does the default syntax highlighting not work for dart files? (Everything is yellow) |
Implements #226.