A VS Code extension that adds support for KL.
The extension is written to be able to run both in the native version (node) and the browser version of VS Code.
Structure
.
├── client // Language Client
│ ├── src
│ │ ├── nodeClientMain.ts // Entry point for node
│ │ └── browserClientMain.ts // Entry point for the browser
├── package.json // The extension manifest.
└── server // Language Server
└── src
├── nodeServerMain.ts // Entry point for node
└── browserServerMain.ts // Entry point for the browser
Known bugs
This barely works and is still actively worked on.
Node version is most stable, but quite slow unless you have a klc jar or binary (not yet released).
Many things are expected not to work. Some concrete examples:
Hover works on the saved version of the file. If you type something and hover in the file, the byte offset of your cursor is used to provide information for the non-saved file.
Autocomplete collects "file-local information" from the saved version of your current file. This means that if you save your file in an invalid state, none of the suggestions will contain local types/var/method information.
Hover provider for node will work forever if you leave your mouse over something that generates info and you have a klc jar/binary. This is because the jar/binary writes to temporary files during its work, and that causes VS Code to want to reevaluate the hover info, which generates new temporary files, etc.
Semantic highlighter will provide zero tokens for a file if it contains any syntax or semantic errors.
The KL language isn't properly documented, you cannot actually build with this extension yet, only autocomplete/validate/etc, there is much to do. Please have low expectations ;-).