slint/tools/lsp
Tobias Hunger 40cd2cc8fe live-preview: Enforce minimum size consistently
Stop resizing to a size that is too small to interact with anymore.

This was enforced in most places, but I apparently missed one ;-)

Fixes: #6286
2024-10-07 19:38:07 +02:00
..
common janitor: remove unused function 2024-09-18 18:17:27 +02:00
fmt fmt: Fix moving comments on the next line 2024-09-16 13:02:14 +02:00
language LSP: changed callbacks auto-completion 2024-09-26 18:20:03 +02:00
LICENSES Simplify commercial license (#3063) 2024-05-31 14:06:17 +02:00
preview live-preview: Sort styles in style combobox 2024-10-07 11:15:54 +02:00
ui live-preview: Enforce minimum size consistently 2024-10-07 19:38:07 +02:00
build.rs Simplify commercial license (#3063) 2024-05-31 14:06:17 +02:00
Cargo.toml lsp: Follow up cargo-machete 2024-10-02 15:20:23 +02:00
common.rs lsp: Ignore optimized out elements when looking for parent 2024-09-27 15:23:13 +02:00
fmt.rs Simplify commercial license (#3063) 2024-05-31 14:06:17 +02:00
language.rs lsp: Make live-preview preview on the type, not the base type 2024-10-07 19:12:57 +02:00
lsp_ext.rs Simplify commercial license (#3063) 2024-05-31 14:06:17 +02:00
main.rs live-preview: Add a CodeButton component 2024-09-17 18:39:37 +02:00
preview.rs LSP: Fix preview not showing at a decent size 2024-10-02 10:50:46 +02:00
README.md Simplify commercial license (#3063) 2024-05-31 14:06:17 +02:00
util.rs lsp: Add a test for the TextRange to Range conversions 2024-08-26 14:51:47 +02:00
wasm_main.rs live-preview: Add a CodeButton component 2024-09-17 18:39:37 +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 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

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.