Skip to content

nishtahir/language-kotlin

Repository files navigation

Language Kotlin

A textmate compatible grammar for the Kotlin language.

Master
Node.js CI

Contributing

Requirements

  • NodeJS

Setup

This project is built using a couple of handy node scripts. Begin by installing the required dependencies.

$ npm install

Build

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 to what it would look like when it's deployed available right now.

You can format your sources using the code formatting script.

$ npm run format

Testing

All changes to the grammar must be accompanied by tests.

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

Useful resources

Code of Conduct

Please note we have a code of conduct, please follow it in all your interactions with the project.