Skip to content

Add Dart highlighting support#229

Open
joshdick wants to merge 4 commits intomainfrom
dartHighlighting
Open

Add Dart highlighting support#229
joshdick wants to merge 4 commits intomainfrom
dartHighlighting

Conversation

@joshdick
Copy link
Copy Markdown
Owner

@joshdick joshdick commented Jul 7, 2020

Implements #226.

@l0nax
Copy link
Copy Markdown

l0nax commented Jul 9, 2020

The colors do look like expected 👍

Copy link
Copy Markdown
Owner Author

@joshdick joshdick left a 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 links 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.

Comment thread colors/onedark.vim
call s:h("cssTagName", { "fg": s:red })

" Dart
call s:h("dartTypeDef", { "fg": s:red })
Copy link
Copy Markdown
Owner Author

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

Comment thread colors/onedark.vim

" Dart
call s:h("dartTypeDef", { "fg": s:red })
call s:h("dartClassDecl", { "fg": s:red })
Copy link
Copy Markdown
Owner Author

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

Comment thread colors/onedark.vim
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 })
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See dartClassDecl.

Comment thread colors/onedark.vim
" Dart
call s:h("dartTypeDef", { "fg": s:red })
call s:h("dartClassDecl", { "fg": s:red })
call s:h("dartInterpolation", { "fg": s:blue })
Copy link
Copy Markdown
Owner Author

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

Comment thread colors/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 })
Copy link
Copy Markdown
Owner Author

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

Comment thread colors/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 })
Copy link
Copy Markdown
Owner Author

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

@l0nax
Copy link
Copy Markdown

l0nax commented Jul 22, 2020

Then why does the default syntax highlighting not work for dart files? (Everything is yellow)

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

Successfully merging this pull request may close these issues.

2 participants