kotlin-language-server
kotlin-language-server copied to clipboard
imports folding like vscode-java
I can help conttribute to this if anyone is willing to give me some pointers on where/how to start.
Hi! I am not entirely sure how vscode-java
handles this, but I think it should be possible to implement this via the Kotlin grammar/syntax in this repo.
- There are some docs here on how to write TextMate grammars (and in particular folding)
- For development of this grammar, I recommend using the
vscode-grammar-dev
extension (should already be listed in the run/debug menu if you open this repo with VSCode).
If that turns out to be insufficient, we could also add support via LSP's folding range request. The language server of course has the advantage of having access to the full parse tree rather than just the tokenization rules defined by the syntax grammar, but in this case I think the grammar should be sufficient.