VS Code Extensions
Knot Lang

Knot Lang

by Knot-Language

Knot language support for VS Code

Downloads

1

Rating

(0)

Version

0.0.4

Last updated

Jun 30, 2026

logo

Syntax highlighting and Language Server Protocol support for the Knot programming language.

Features

  • Syntax highlighting — Full tokenization for .knot source files:

    • Keywords (func, class, enum, if, match, for, while, import, etc.)
    • Primitive types (I8I64, U8U64, F32, F64, String, Bool, Void)
    • String literals (double-quoted with escapes, single-quoted raw, backtick raw)
    • Numeric literals (decimal, hex 0x, binary 0b, octal 0o, float with suffixes)
    • Comments (// line, /* */ block)
    • Operators (->, =>, ++, +=, ==, !=, ??, .., ::, etc.)
    • Function / class / enum name highlighting
    • Wrap decorators (@name)
  • Language Server Protocol — Requires a knot compiler binary on PATH:

    • Real-time diagnostics (parser + semantic analysis errors and warnings)
    • Code completion (keywords and built-in types)
    • Hover information
  • Language configuration — Bracket matching, auto-closing pairs, comment toggling

Requirements

A knot compiler binary that supports the lsp subcommand. Build it from source:

git clone https://github.com/knot-lang/knot
cd knot
cargo build

Extension Settings

Setting Default Description
knot.lsp.path "knot" Path to the knot compiler binary

Syntax highlighting works without the compiler. The LSP features (diagnostics, completion, hover) require a knot binary that supports knot lsp.

Known Issues

  • LSP server restart is disabled; if the compiler crashes, reload the window (Ctrl+Shift+PDeveloper: Reload Window).
  • Completion list is currently a static keyword set (not context-aware).

Release Notes

0.0.1

Initial release: syntax highlighting + LSP (diagnostics, completion, hover).

Related extensions