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

Add yaml-mode #1090

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

junjihashimoto
Copy link
Contributor

Hi,
Add the highlight of yaml-file.

\n
{ c Style.quoteStyle }
.
{ c Style.quoteStyle }
Copy link
Member

Choose a reason for hiding this comment

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

I think making this defaultStyle is better, quoteStyle is really for Template Haskell or lisp style quotes. See https://github.com/yi-editor/yi/blob/master/yi-misc-modes/src/Yi/Lexer/JSON.x for a comparable lexer.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for your review in your busy time
I'll fix the style.(I wonder if I should use defaultStyle or other styles.)

{
^\%.* { c Style.importStyle }
^\-\-\- { c Style.importStyle }
^$space*\#.* { c Style.commentStyle }
Copy link
Member

Choose a reason for hiding this comment

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

Comments can also appear after some other tokens, like:

# Comment on a line
"symfony 1.0": { PHP: 5.0, Propel: 1.2 } # Comment at the end of a line
"symfony 1.2": { PHP: 5.2, Propel: 1.3 }

Taken from: https://symfony.com/doc/current/components/yaml/yaml_format.html#comments

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed a comment-pattern.

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