feat: add TextMate grammar#332
Open
jack5github wants to merge 3 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤔 What's changed?
cucumber.tmLanguage.jsonwhich contains TextMate grammar rules for enhanced syntax highlighting and colour theme customisation.scripts/update-grammar.jswhich updatescucumber.tmLanguage.jsonwith all Gherkin language keywords and saves it toout/cucumber.tmLanguage.json(which is whitelisted in.vscodeignore).package.json's scripts to addupdate-grammar, which is run duringnpm run build, and to include the new TextMate grammar rules, as well as the embedded languagesjson,xml,yaml(VSCode in-built data serialisation languages) andmarkdown(commonly used to store large text).README.mdupdatedCONTRIBUTING.md⚡️ What's your motivation?
The semantic highlighting that this VSCode extension currently supplies is insufficient when it comes to understanding feature files at a glance, as a lot of colour and font style customisations that could be applied to these files (e.g., heading styles, block comments, etc.) is absent. The most egregious example of this is feature, rule and scenario descriptions not standing out from step names.
🏷️ What kind of change is this?
Example below (colour theme is 'Dark 2026'):
♻️ Anything particular you want feedback on?
json,markdown,xmlandyamlare supported as embedded languages in doc strings. This list may need to be expanded depending on the needs of testers. It would be very difficult to dynamically update this list.📋 Checklist:
I have added/updated tests to cover my changes.(This VSCode plugin has no automated tests to assess its functionality. I tested my changes through manual testing.)