Skip to content

Redone YAML grammar#11666

Closed
nDmitry wants to merge 4 commits into
microsoft:masterfrom
nDmitry:patch-1
Closed

Redone YAML grammar#11666
nDmitry wants to merge 4 commits into
microsoft:masterfrom
nDmitry:patch-1

Conversation

@nDmitry
Copy link
Copy Markdown

@nDmitry nDmitry commented Sep 8, 2016

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

Image

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:

Image

Image


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
Copy link
Copy Markdown

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
Copy link
Copy Markdown
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
Copy link
Copy Markdown

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
Copy link
Copy Markdown
Author

nDmitry commented Sep 9, 2016

Seems working too now.

screen shot 2016-09-09 at 15 40 11

@ghost
Copy link
Copy Markdown

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
Copy link
Copy Markdown

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
Copy link
Copy Markdown
Author

nDmitry commented Sep 9, 2016

Thanks, I have updated the license.

@coveralls
Copy link
Copy Markdown

Coverage Status

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

@aeschli
Copy link
Copy Markdown
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
Copy link
Copy Markdown

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"..

@github-actions github-actions Bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants