A textmate compatible grammar for the Kotlin language.
This project is built using a couple of handy node scripts. Begin by installing the required dependencies.
$ npm install
Changes to the grammar should be made in the src
folder. These are merged at build
time and used to produce the final artifact.
Once you are satisfied with your changes, you will need to generate
xml
and json
variants for distribution.
There's a handy build script available to automate this process.
$ npm run build
This will outputs the merged sources to the dist
directory. At this point
it's highly recommended that you test your changes using GitHub Lightshow. There's some manual work involved in doing this however this is the closest
representation of what it would look like when it is deployed that is available at this time.
You can format your sources using the code formatting script.
$ npm run format
All changes to the grammar must be accompanied by tests covering relevant scopes.
Tests are run using vscode-tmgrammar-test
.
Test cases and regression tests are available in the /test
folder.
Generated snapshots are available in the /snapshots
folder and should be updated with changes
to the grammar.
The test suite can be run using npm
$ npm test
- GitHub Lightshow - Useful for testing Grammar sources against Code to inspect the highlighting behavior
- Sublime Text scope naming reference - Reference on Textmate scope naming
Please note we have a code of conduct which must be observed in interactions with the project.