slint/tools/lsp
Tobias Hunger 0a25de3e1d
Some checks are pending
CI / wasm_demo (push) Blocked by required conditions
autofix.ci / format_fix (push) Waiting to run
autofix.ci / lint_typecheck (push) Waiting to run
CI / build_and_test (ubuntu-22.04, nightly) (push) Blocked by required conditions
CI / node_test (macos-14) (push) Blocked by required conditions
CI / node_test (ubuntu-22.04) (push) Blocked by required conditions
CI / node_test (windows-2022) (push) Blocked by required conditions
CI / python_test (macos-14) (push) Blocked by required conditions
CI / python_test (ubuntu-22.04) (push) Blocked by required conditions
CI / python_test (windows-2022) (push) Blocked by required conditions
CI / cpp_package_test (push) Blocked by required conditions
CI / cpp_cmake (windows-2022, nightly) (push) Blocked by required conditions
CI / updater_test (0.3.0) (push) Blocked by required conditions
CI / tree-sitter (push) Blocked by required conditions
CI / files-changed (push) Waiting to run
CI / build_and_test (--exclude ffmpeg --exclude gstreamer-player, macos-14, stable) (push) Blocked by required conditions
CI / cpp_cmake (ubuntu-22.04, stable) (push) Blocked by required conditions
CI / build_and_test (--exclude ffmpeg --exclude gstreamer-player, windows-2022, 1.85) (push) Blocked by required conditions
CI / build_and_test (--exclude ffmpeg --exclude gstreamer-player, windows-2022, beta) (push) Blocked by required conditions
CI / build_and_test (--exclude ffmpeg --exclude gstreamer-player, windows-2022, stable) (push) Blocked by required conditions
CI / build_and_test (ubuntu-22.04, 1.85) (push) Blocked by required conditions
CI / docs (push) Blocked by required conditions
CI / cpp_test_driver (macos-13) (push) Blocked by required conditions
CI / cpp_test_driver (ubuntu-22.04) (push) Blocked by required conditions
CI / cpp_test_driver (windows-2022) (push) Blocked by required conditions
CI / cpp_cmake (macos-14, 1.85) (push) Blocked by required conditions
CI / wasm (push) Blocked by required conditions
CI / vsce_build_test (push) Blocked by required conditions
CI / mcu (pico-st7789, thumbv6m-none-eabi) (push) Blocked by required conditions
CI / mcu (pico2-st7789, thumbv8m.main-none-eabihf) (push) Blocked by required conditions
CI / mcu (stm32h735g, thumbv7em-none-eabihf) (push) Blocked by required conditions
CI / mcu-embassy (push) Blocked by required conditions
CI / ffi_32bit_build (push) Blocked by required conditions
CI / fmt_test (push) Blocked by required conditions
CI / esp-idf-quick (push) Blocked by required conditions
CI / android (push) Blocked by required conditions
CI / miri (push) Blocked by required conditions
CI / test-figma-inspector (push) Blocked by required conditions
lsp: Clippy fixes
2025-07-02 14:14:05 +02:00
..
common LSP: rename callback and functions (#8800) 2025-07-01 11:28:25 +02:00
fmt Add local variables (#8740) 2025-06-26 15:36:49 +02:00
language LSP: rename callback and functions (#8800) 2025-07-01 11:28:25 +02:00
LICENSES Simplify commercial license (#3063) 2024-05-31 14:06:17 +02:00
preview lsp: Clippy fixes 2025-07-02 14:14:05 +02:00
ui Live-Preview: use DragArea and DropArea 2025-06-26 15:39:18 +02:00
build.rs Simplify commercial license (#3063) 2024-05-31 14:06:17 +02:00
Cargo.toml Bump version number to 1.13.0 2025-06-26 13:30:43 +00:00
common.rs lsp: Extract the fuzzy matching code into common 2025-06-06 18:45:20 +02:00
fmt.rs Simplify commercial license (#3063) 2024-05-31 14:06:17 +02:00
language.rs Auto-fixed clippy::unnecessary_map_or 2025-02-07 09:02:31 +01:00
main.rs LSP: add a comment explaining the meaning of the SLINT_LSP_PANIC_LOG env variable 2025-07-01 17:01:21 +02:00
preview.rs lsp: Clippy fixes 2025-07-02 14:14:05 +02:00
README.md lsp: Document debian dependencies 2025-01-30 15:22:38 +01:00
util.rs Fix compilation error 2025-06-26 16:13:42 +02:00
wasm_main.rs live-preview: Send telemetry to VSCode 2025-05-09 19:18:27 +02:00

LSP (Language Server Protocol) Server for Slint

This directory contains the implementation of the LSP server for Slint featuring diagnostics, code completion, goto definition, and more importantly, live-preview

Generic usage

The LSP server consists of a binary, slint-lsp (or slint-lsp.exe on Windows). It provides all the functionality and allows any programming editor that also implements the standardized LSP protocol to communicate with it.

If you have Rust installed, you can install the binary by running the following command:

cargo install slint-lsp

This makes the latest released version available in $HOME/.cargo/bin. If you would like to try a development version, you can also point cargo install to the git repository: for the released version. Or, to install the development version:

cargo install slint-lsp --git https://github.com/slint-ui/slint --force

Alternatively, you can download one of our pre-built binaries for Linux or Windows:

  1. Open https://github.com/slint-ui/slint/releases
  2. Click on the latest release
  3. From "Assets" download either slint-lsp-linux.tar.gz for a Linux x86-64 binary or slint-lsp-windows.zip for a Windows x86-64 binary.
  4. Uncompress the downloaded archive into a location of your choice.

As the next step, configure your editor to use the binary, no arguments are required

Make sure the required dependencies are found. On Debian-like systems install them with the following command:

sudo apt install -y build-essential libx11-xcb1 libx11-dev libxcb1-dev libxkbcommon0 libinput10 libinput-dev libgbm1 libgbm-dev

Code formatting

The slint code formatting tool is part of the lsp. To learn how to use it as a standalone tool, see fmt README

Editor configuration

Please check the editors folder in the Slint repository for instructions on how to set up different editors to work with Slint.