slint/tools/lsp
Olivier Goffart 9a882dd17f
Some checks failed
autofix.ci / lint_typecheck (push) Has been cancelled
CI / files-changed (push) Has been cancelled
autofix.ci / format_fix (push) Has been cancelled
CI / python_test (windows-2022) (push) Has been cancelled
CI / wasm_demo (push) Has been cancelled
CI / python_test (macos-14) (push) Has been cancelled
CI / tree-sitter (push) Has been cancelled
CI / python_test (ubuntu-22.04) (push) Has been cancelled
CI / build_and_test (--exclude bevy-example, ubuntu-22.04, 1.85) (push) Has been cancelled
CI / build_and_test (--exclude ffmpeg --exclude gstreamer-player, --exclude bevy-example, windows-2022, 1.85) (push) Has been cancelled
CI / build_and_test (--exclude ffmpeg --exclude gstreamer-player, macos-14, stable) (push) Has been cancelled
CI / build_and_test (--exclude ffmpeg --exclude gstreamer-player, windows-2022, beta) (push) Has been cancelled
CI / build_and_test (--exclude ffmpeg --exclude gstreamer-player, windows-2022, stable) (push) Has been cancelled
CI / build_and_test (ubuntu-22.04, nightly) (push) Has been cancelled
CI / node_test (macos-14) (push) Has been cancelled
CI / node_test (ubuntu-22.04) (push) Has been cancelled
CI / node_test (windows-2022) (push) Has been cancelled
CI / cpp_test_driver (macos-13) (push) Has been cancelled
CI / cpp_test_driver (ubuntu-22.04) (push) Has been cancelled
CI / cpp_test_driver (windows-2022) (push) Has been cancelled
CI / cpp_cmake (macos-14, 1.85) (push) Has been cancelled
CI / cpp_cmake (ubuntu-22.04, stable) (push) Has been cancelled
CI / cpp_cmake (windows-2022, nightly) (push) Has been cancelled
CI / cpp_package_test (push) Has been cancelled
CI / vsce_build_test (push) Has been cancelled
CI / mcu (pico-st7789, thumbv6m-none-eabi) (push) Has been cancelled
CI / mcu (pico2-st7789, thumbv8m.main-none-eabihf) (push) Has been cancelled
CI / mcu (stm32h735g, thumbv7em-none-eabihf) (push) Has been cancelled
CI / mcu-embassy (push) Has been cancelled
CI / ffi_32bit_build (push) Has been cancelled
CI / docs (push) Has been cancelled
CI / wasm (push) Has been cancelled
CI / updater_test (0.3.0) (push) Has been cancelled
CI / fmt_test (push) Has been cancelled
CI / esp-idf-quick (push) Has been cancelled
CI / android (push) Has been cancelled
CI / miri (push) Has been cancelled
CI / test-figma-inspector (push) Has been cancelled
live-preview: Only show the "Select an Element" text if there is no element selected
The property list can be empty if there is a search term that doesn't match
2025-09-12 17:25:40 +02:00
..
common live-preview: add a callback to rename an element 2025-09-03 22:16:34 +02:00
fmt fmt: Keep spaces after element node even if the last token is a space (#9256) 2025-08-26 16:48:57 +02:00
language slint macro: Use Span::local_file when Rust is 1.88 2025-09-12 13:27:31 +02:00
LICENSES Simplify commercial license (#3063) 2024-05-31 14:06:17 +02:00
preview live-preview: search line edit in property list 2025-09-12 17:25:40 +02:00
ui live-preview: Only show the "Select an Element" text if there is no element selected 2025-09-12 17:25:40 +02:00
build.rs Simplify commercial license (#3063) 2024-05-31 14:06:17 +02:00
Cargo.toml Bump version number to 1.14.0 2025-09-11 14:01:14 +00:00
common.rs lsp: No error when sending messages to the Preview fails 2025-09-10 19:35:47 +02:00
fmt.rs Simplify commercial license (#3063) 2024-05-31 14:06:17 +02:00
language.rs lsp: No error when sending messages to the Preview fails 2025-09-10 19:35:47 +02:00
main.rs lsp: No error when sending messages to the Preview fails 2025-09-10 19:35:47 +02:00
preview.rs live-preview: add a callback to rename an element 2025-09-03 22:16:34 +02:00
README.md Zed extension: fix windows package name 2025-08-19 10:14:18 +02:00
util.rs Parse: accept changed callback without brace 2025-08-29 14:49:47 +02:00
wasm_main.rs lsp: No error when sending messages to the Preview fails 2025-09-10 19:35:47 +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-x86_64.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.