Commit graph

14 commits

Author SHA1 Message Date
Tobias Hunger
55cc1ae31f lsp: Remove the PostLoadBehavior
We always update if we have a UI and we never update if not. So this
flag does not help.
2023-11-03 22:14:20 +01:00
Tobias Hunger
a0cc85bfb4 LSP: Remove design mode custom commands 2023-11-03 22:14:20 +01:00
Tobias Hunger
55d0f5d473 lsp: Make native UI work
The UI is ugly and does not include the Design Mode button yet, but it
is a bit of progress.
2023-11-03 22:14:20 +01:00
J-P Nurmi
0d366e0087 LSP: add "Repeat element" and "Make conditional" code actions 2023-10-23 15:58:24 +02:00
J-P Nurmi
c5248c005e Allow specifying paths for @library imports 2023-10-20 16:47:00 +02:00
Tobias Hunger
caee0b2f9d janitor: Fix a semi-random selection of clippy warnings
Nothing serious in there.
2023-10-16 13:44:37 +02:00
J-P Nurmi
400404623d LSP: fix typo in "slint.includePaths" config 2023-10-12 11:10:14 +02:00
Tobias Hunger
0ff8e2cdb6 compiler: Rework path handling
Add some code to do platform-independent path processing.

This is necessary aas WASM does e.g. not have any absolute paths and
such and the compiler tended to produce wrong results in that case.

Side-effect: We no longer need to depend on `dunce`
2023-10-10 20:04:47 +02:00
J-P Nurmi
8284674d4d VSCode: add "Remove element" code action 2023-09-08 16:38:16 +02:00
Olivier Goffart
24d3ac9e0d LSP: handle empty string as component name in the showPreview command
Somehow the vscode extension started to send an empty string for the showPreview
command instead of nothing. Resulting in the showPreview command from the command
palette not working anymore.

Fix #3412
2023-09-07 15:01:59 +02:00
J-P Nurmi
5ce11e302a
vscode: add "wrap in element" code action (#3420) 2023-09-07 12:11:14 +02:00
Tobias Hunger
3023393fa1 lsp: Use same conversion from URL to PathBuf everywhere
This makes sure paths match up with each other. Highlighting broke for
me since the paths in the DocumentCache were canonicalized while the path
the LSP wanted the preview to highlight was not.
2023-08-31 13:08:30 +02:00
Tobias Hunger
d5cc147644 lsp: Use one common Error type (where possible) 2023-08-30 10:31:55 +02:00
Tobias Hunger
4dda627d14 LSP: Move code around
No behavior should change in this patch!

Move all the code directly related to the LSP into a `language` module,
with `server_loop.rs` becoming `language.rs`, managing that module.

All the preview related code is moved into `preview`, with `preview.rs`
basically forwarding to `native.rs` and `wasm.rs`.

Code accessed from both `language` and `preview` stayed where it was.
2023-08-28 13:34:35 +02:00
Renamed from tools/lsp/server_loop.rs (Browse further)