Commit graph

35 commits

Author SHA1 Message Date
Olivier Goffart
09dc25f107 Keep all nodes for a given element (even if it is optimized out) 2024-01-25 14:45:22 +01:00
Olivier Goffart
7b3d96368b LSP: Fix error when going to the definition of builtin items
Instead of returning an "invalid:/" URL for the builtins, we should just
return a None result from the goto definition function.

Also add a test for goto_definition

Fixes #4126
2023-12-19 16:16:19 +01:00
Tobias Hunger
b12c35d877 LSP: Improve automatic insertion of import identifiers on completion
Insert before the last whitespace. Adding Bar into `import { Foo } from
"..."` looks like this:

```slint
import { Foo , Bar} from "..." // old
import { Foo, Bar } from "..." // new
` ``
2023-12-11 08:29:42 +01: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
Tobias Hunger
89a2e34c9e lsp: Extract some types out into a new common location
These are types I want to use to separate the previewer and the LSP part
more cleanly going forward.
2023-08-24 17:14:54 +02:00
darknight
879438a27a auto complete for animate block 2023-08-24 07:32:37 +02:00
Aurindam Jana
5a4a7fee63
Update royalty free license to 1.1 (#2994) 2023-07-10 10:12:11 +02:00
Tobias Hunger
8345c6cd79 Do automatic clippy fixes 2023-06-28 14:22:30 +02:00
Olivier Goffart
11dea135f7 Domain: slint-ui.com -> slint.dev 2023-06-16 10:55:08 +02:00
Aurindam Jana
039e54a5de
Add royalty free license to files except examples and docs (#2888) 2023-06-15 11:20:50 +02:00
Olivier Goffart
abbba8cbe8 LSP: fix completion of function arguments 2023-05-03 09:09:01 +02:00
Olivier Goffart
5c4a1746d4 LSP: fix completion of callback arguments 2023-05-03 09:09:01 +02:00
Olivier Goffart
7d78bd2dcd LSP: fix the lookup scope
And add a test for the completion
2023-05-03 09:09:01 +02:00
Tobias Hunger
bb67122a50 LSP: Remove offset to position mapper 2023-05-02 15:12:01 +02:00
Olivier Goffart
208d89c1de LSP: Don't auto-complete reserved properties or sub-elements for globals 2023-04-05 20:05:09 +02:00
Tobias Hunger
3ac01c3f07 clippy: Fix clippy warnings 2023-03-09 09:35:29 +01:00
Tobias Hunger
edd4e81033 lsp: Add setBinding custom command 2022-11-21 15:01:09 +01:00
Olivier Goffart
d02d1bf88f lsp: fix range in properties
The comment says that the LSP protocol needs a +1/-1, but that's not the
case, and the vscode conversion function don't have that.
So remove that -1.

This fixes the property edition in the property view in vscode
2022-11-17 20:02:39 +01:00
Tobias Hunger
5e0f90e325 lsp: Report actual property value text in queryProperties 2022-11-11 19:44:08 +01:00
Olivier Goffart
28ae8f7bc4 Refactoring: split ElementType away from the types used as property type
These are two different concept, and it is confusing to keep them in the
same enum

We want to support component without any base element, and Void is
already used for global component, so do this refactoring before
2022-10-26 14:50:44 +02:00
Simon Hausmann
bd412623ab
Online editor: Fix binding expression text shown in the properties view (#1753)
Use the zero-line based lsp range/position types for the QueryProperties
lsp command results and convert them to monaco editor ranges for correct
text extraction.
2022-10-20 15:49:23 +02:00
Olivier Goffart
474a2ba331 LSP: make the preview feature optional
So it can be disabled when building the web extension, and remove lots of dependencies.

This reduce the wasm size from 6M to 2M
2022-06-03 19:18:03 +02:00
Tobias Hunger
4230ac2572
Update copyright information to reflect name change
Also run resue over the codebase and fix complaints from that tool.
2022-02-09 10:27:47 +01:00
Tobias Hunger
de4e195280
Rename internal crates and add a README.md to them
The README.md contains the warning that used to be in lib.rs.

Add README.md files to all internal crates

... pointing to the official public crate to use instead.

Rename internal crates

fixup: README files

fixup rename
2022-02-07 13:12:48 +01:00
Simon Hausmann
2f73a27635 Rename the sixtyfps-interpreter crate 2022-02-01 18:11:25 +01:00
Simon Hausmann
cab22f8355 Rename the sixtyfps-compilerlib crate 2022-02-01 18:08:18 +01:00
Simon Hausmann
9be2cfc6e0 Mark the DiagnosticLevel enum as non_exhaustive
Also provide some words of documentation.
2022-01-31 12:37:36 +01:00
Tobias Hunger
bfca0e3573 Mass update copyright messages to be more REUSE compliant 2021-12-22 10:06:12 +01:00
Olivier Goffart
56d592100e Update a few dependencies 2021-10-21 12:24:48 +02:00
Tobias Hunger
9539a53480 Janitor: Fix clippy::redundant_clone 2021-07-23 13:48:52 +02:00
Olivier Goffart
13bd828b96 Update license date 2021-07-02 15:55:54 +02:00
Olivier Goffart
715d38903f Allow to omit the type of aliases 2021-06-07 10:48:09 +02:00
Olivier Goffart
8ecc834333 LSP: forward the diagnostic from the preview to the editor
Because the preview might have more diagnostics.
2021-05-18 16:12:30 +02:00
Olivier Goffart
a31b8f51d9 LSP: d-duplicate some code 2021-04-17 12:50:47 +02:00
Olivier Goffart
06f2223bb2 LSP: move code around 2021-04-17 12:50:47 +02:00