slint/tools/lsp
Olivier Goffart 143ad8ab75 LSP: use the new syntax to create the previewed component
Avoid warnings when previewing
2023-02-21 19:47:08 +01:00
..
LICENSES Fix LICENSES symlinks 2022-02-09 17:05:47 +01:00
Cargo.toml Change the name of the compat feature (#2230) 2023-02-16 09:40:44 +01:00
completion.rs WIP: pure qualifier for callback and functions 2022-12-22 00:26:27 -08:00
goto.rs WIP: pure qualifier for callback and functions 2022-12-22 00:26:27 -08:00
lsp_ext.rs Update copyright information to reflect name change 2022-02-09 10:27:47 +01:00
main.rs tools: Remove progress reporting for file loading 2023-01-23 19:51:55 +01:00
preview.rs LSP: use the new syntax to create the previewed component 2023-02-21 19:47:08 +01:00
properties.rs janitor: Make LSP clippy clean 2023-01-16 14:42:36 +01:00
README.md Rename the editor folder to editors 2022-06-27 17:44:46 +02:00
semantic_tokens.rs Update syntax highlight for Functions and in-out things 2022-12-08 10:14:54 +01:00
server_loop.rs LSP: Dont detect slint::slint! as slint macro in comments or stings 2023-02-09 08:52:51 +01:00
test.rs lsp: Update unit tests to new slint syntax 2023-01-12 17:01:11 +01:00
util.rs lsp: Add setBinding custom command 2022-11-21 15:01:09 +01:00
wasm_main.rs tools: Remove progress reporting for file loading 2023-01-23 19:51:55 +01: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 develoment 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

Editor configuration

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