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

Adding syntax highlighting #1041

Merged

Conversation

jensakejohansson
Copy link
Contributor

Hi!
@sriv @zabil
Addressing this issue:
#884

Implemented syntax highlighting. All token-matching is done on extensions side. Extension provides default colors that works fine with VSC default (dark) theme, but can be overridden in settings.json.

Also, during test development I often want to temporarily disable one or multiple steps in a scenario. Although it's not technically markdown I simply put the common "//" in front of the step (and any table) and then the runner ignores it. I've added a binding to VSC short-cut for comment/un-comment that adds "//" at the beginning of the line (which makes it possible to disable many steps quickly my selecting multiple lines). I find it very convenient and I don't see that it does any harm.

Default look example:

bild

To override any user can just set their values/colors accordingly:
bild

Signed-off-by: Jens Johansson <jens.johansson@systemverification.com>
Signed-off-by: Jens Johansson <jens.johansson@systemverification.com>
@sriv
Copy link
Member

sriv commented Feb 4, 2025

The build failed @jensakejohansson, do you have any idea why?

Signed-off-by: Jens Johansson <jens.johansson@systemverification.com>
@jensakejohansson
Copy link
Contributor Author

jensakejohansson commented Feb 4, 2025

@sriv Seems it failed due to a rule in TSLint in the pipeline which doesn't apply in my local env. Changed the expression so now the linter should accept it.

Signed-off-by: Jens Johansson <jens.johansson@systemverification.com>
@jensakejohansson
Copy link
Contributor Author

@sriv Addad a small adjustment to also highlight concept arguments and not only arguments in steps. It was a late night yesterday, so I missed that :) Feel free to make a build when you have time...

@gaugebot
Copy link

gaugebot bot commented Feb 5, 2025

@jensakejohansson Thank you for contributing to gauge-vscode. Your pull request has been labeled as a release candidate 🎉🎉.

Merging this PR will trigger a release.

Please bump up the version as part of this PR.

Instructions to bump the version can found at CONTRIBUTING.md

If the CONTRIBUTING.md file does not exist or does not include instructions about bumping up the version, please looks previous commits in git history to see what changes need to be done.

@sriv sriv merged commit bfff728 into getgauge:master Feb 5, 2025
4 checks passed
@jensakejohansson jensakejohansson deleted the adding-semantic-token-colors branch February 5, 2025 08:01
sriv pushed a commit that referenced this pull request Feb 5, 2025
…ge server. (#1038)

* Added setting for config Gauge formatter and send the settings to Gauge server.

Signed-off-by: Jens Johansson <jens.johansson@systemverification.com>

* Added setting for config Gauge formatter and send the settings to Gauge server.

Signed-off-by: Jens Johansson <jens.johansson@systemverification.com>

* Bump @types/node from 22.10.10 to 22.13.0 (#1039)

Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.10.10 to 22.13.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Adding syntax highlighting (#1041)

* Adding code & default config syntax highlighting.

Signed-off-by: Jens Johansson <jens.johansson@systemverification.com>

* Adding code & default config syntax highlighting.

Signed-off-by: Jens Johansson <jens.johansson@systemverification.com>

* Adding code & default config syntax highlighting.

Signed-off-by: Jens Johansson <jens.johansson@systemverification.com>

* Adding code & default config syntax highlighting.

Signed-off-by: Jens Johansson <jens.johansson@systemverification.com>

---------

Signed-off-by: Jens Johansson <jens.johansson@systemverification.com>

* Added setting for config Gauge formatter and send the settings to Gauge server.

Signed-off-by: Jens Johansson <jens.johansson@systemverification.com>

* Added setting for config Gauge formatter and send the settings to Gauge server.

Signed-off-by: Jens Johansson <jens.johansson@systemverification.com>

---------

Signed-off-by: Jens Johansson <jens.johansson@systemverification.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@ckcr4lyf
Copy link

@jensakejohansson thanks for this, it was a very welcome surprise when I was working on some specs today!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants