Lithe for VS Code
Language support for Lithe components: .lithe files that mix Kotlin, HTML and scoped CSS, compiled to Kotlin on a small
fine-grained runtime.
The extension starts the Lithe language server, the same one the IntelliJ IDEA plugin runs, and colors the markup, the <script kotlin> block and the
<style> blocks.
Requirements
A JDK 17 or newer. The server is a jar, and the extension looks for the JDK in this order: the lithe.javaHome setting, JAVA_HOME, the java of the
PATH, the JDK of the Java extension, then the JDKs installed on the machine (~/.jdks, SDKMAN, the system folders). One older than 17 is skipped, and the
extension says so when none is left.
The colors of the Kotlin inside a component need an installed extension that provides a Kotlin grammar.
Features
- Errors and warnings of the Lithe compiler as you type, for every
.lithe file of the workspace.
- Completion of components (adding their import), props, attributes, events, directives, Kotlin names and the members of a value whose type the file tells.
- Hover with the documentation of components, props and declarations, and of HTML, CSS and browser APIs with their Baseline status.
- Definition, references and rename across files, components with their file.
- Inlay hints for the types of
state and derived values, listener parameters and what a block closes, signature help, quick fixes, code lenses
with usage counts and links to the generated Kotlin and CSS.
- Outline, breadcrumbs, folding and expand selection for the script, the markup and the styles.
- Color swatches and a color picker in
<style> blocks.
- A background on the uses of what the page follows, state, derived values and props.
lithe.reactiveBackground in workbench.colorCustomizations changes it.
- In a Gradle project, the Kotlin language server of JetBrains adds its hovers, definitions and inferred types to the ones of Lithe.
Settings
| Setting |
Effect |
lithe.javaHome |
The JDK 17 or newer that runs the server. Empty looks for one as described above. |
lithe.server.jar |
Another server jar than the one in the extension. |
Lithe: Restart Language Server stops the server and starts it again, reading these settings again. It also starts it when none could start, for example once
a JDK is installed.
Links
| |