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

Redone YAML grammar #11666

Closed
wants to merge 4 commits into from
Closed

Redone YAML grammar #11666

wants to merge 4 commits into from

Conversation

@nDmitry
Copy link

nDmitry commented Sep 8, 2016

Some symbols can break syntax highlighting with current YAML grammar, e.g.:

There is a new implementation of YAML grammar that can be found in newer sublime and textmate versions, and I think we can easily use it in VS Code. Here's the highlighting with the new grammar:


Imported from sublimehq/Packages and textmate/yaml.tmbundle.
Originally created by @FichteFoll with additional patches from @Briles and @wbond.
Ported to tmLanguage by @infininight.

Known limitations:

  • Most indentation is not checked, except for block scalars, where it is also not verified (i.e. highlights even if less indentation used than required).
  • Properties are sometimes incorrectly highlighted for nested block collections (- !!seq -).

Synced as of sublimehq/Packages@c52dd91, textmate/yaml.tmbundle@953d955

Imported from sublimehq/Packages and textmate/yaml.tmbundle.
Originally created by @FichteFoll with additional patches from @Briles and @wbond.
Ported to tmLanguage by @infininight.

Known limitations:

- Most indentation is not checked, except for block scalars, where it is also not verified (i.e. highlights even if less indentation used than required).
- Properties are sometimes incorrectly highlighted for nested block collections (`- !!seq -`).

Synced as of sublimehq/Packages@c52dd91, textmate/yaml.tmbundle/commit/953d955
@msftclas

This comment has been minimized.

Copy link

msftclas commented Sep 8, 2016

Hi @nDmitry, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

In order for us to evaluate and accept your PR, we ask that you sign a contribution license agreement. It's all electronic and will take just minutes. I promise there's no faxing. https://cla.microsoft.com.

TTYL, MSBOT;

@nDmitry

This comment has been minimized.

Copy link
Author

nDmitry commented Sep 8, 2016

This fixes #1550, #4008 and #6303.
I could use some help with updating YAML tests, or I'll do it myself... eventually.🙂

@ghost

This comment has been minimized.

Copy link

ghost commented Sep 9, 2016

I have a similar issue. You could try if this also works now. Heres a screenshot:

sl-bug-yml

Here's the original code:

### DEPLOY

# Deploy to staging server
deploy-staging:
  stage: deploy
  script:
    - rsync -avzh --progress --delete -e ssh -p "dist-prod/" "${DEPLOY_SERVER_STAGING_USER}@${DEPLOY_SERVER_STAGING_URL}:${DEPLOY_SERVER_STAGING_TARGET}"
  only:
    - master

# Deploy to production server
deploy-prod:
  stage: deploy
  script:
    - rsync -avzh --progress --delete -e ssh -p "dist-prod/" "${DEPLOY_SERVER_PROD_USER}@${DEPLOY_SERVER_PROD_URL}:${DEPLOY_SERVER_PROD_TARGET}"
  only:
    - tags
@nDmitry

This comment has been minimized.

Copy link
Author

nDmitry commented Sep 9, 2016

Seems working too now.

screen shot 2016-09-09 at 15 40 11

@ghost

This comment has been minimized.

Copy link

ghost commented Sep 9, 2016

Awesome, great job :) Thank you very much, this bothered me for weeks now :)

@aeschli aeschli added this to the September 2016 milestone Sep 9, 2016
@FichteFoll

This comment has been minimized.

Copy link

FichteFoll commented Sep 9, 2016

I just want to note that this piece originally included a licence, in both the ST and the textmate repos.

According to the CLA, submissions including work of a third-party are valid as long as the original copyright and license information are retained, so this wouldn't prevent the piece of being added. It's just the license that is missing.

@nDmitry nDmitry force-pushed the nDmitry:patch-1 branch to 2f75a6b Sep 9, 2016
@nDmitry

This comment has been minimized.

Copy link
Author

nDmitry commented Sep 9, 2016

Thanks, I have updated the license.

nDmitry added 2 commits Sep 9, 2016
@coveralls

This comment has been minimized.

Copy link

coveralls commented Sep 9, 2016

Coverage Status

Coverage remained the same at 61.932% when pulling b07ff30 on nDmitry:patch-1 into 819770a on Microsoft:master.

@aeschli

This comment has been minimized.

Copy link
Contributor

aeschli commented Sep 15, 2016

I updated the grammar to textmate/yaml.tmbundle@9a4135d (2016-08-24), added tests and also updated the license.
See @5ba13ddbf359ae3767ea394d03589395089fa529 and @5073dfcc3739ba0ec4e1affeb033ae17d1519227

Thanks a lot @nDmitry and @FichteFoll, great work!

@aeschli aeschli closed this Sep 15, 2016
@Haider-BA

This comment has been minimized.

Copy link

Haider-BA commented Oct 25, 2016

how can I link yaml-cpp library and header files in Visual Studio code C++? I put yaml-cpp include director in "${workspaceRoot}/externals/include"..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.