KScript docs
EN

Install and editors

Editor support

The KScript extension adds errors as you type, completion, hover, go to definition, rename and highlighting for scripts and kscript serve pages. Install it into VS Code, Cursor, VSCodium or Windsurf:

CommandWhat it does
kscript ide installEvery editor it finds.
kscript ide install cursorJust one.
kscript ideList the editors it found.
kscript ide uninstallRemove the extension again.

The extension works out types as it goes. $person. and $name-> offer the fields and methods of that value, including what your own functions return. Inlay hints show the types you didn't write, and thin lines divide a script into blocks like a notebook.

Press F5 in a script to debug it: it stops at your breakpoints, steps through a line at a time and shows every variable. See Debugging.

It runs kscript lsp from your installed kscript, so keep that current with kscript update. To use a different kscript, set kscript.server.path in the editor's settings. Every command and setting of the extension is listed in VS Code commands and settings.

Other editors

Other editors with LSP support work too. kscript ide config prints the settings to add:

CommandWhat it does
kscript ide config neovimAlso helix, sublime or emacs.

kscript check <folder> reports the same problems on the command line, for CI. See the language server for how it works.

Edit this page on GitHub