Simon Hausmann
d9db07db2a
Try to gracefully terminate the LSP server when requested
2021-04-06 11:10:30 +02:00
Simon Hausmann
121a098f74
Fix lsp startup
...
Copy & paste brown paper bag for me for not calling the function :)
2021-04-06 11:05:05 +02:00
Simon Hausmann
9f2924a642
Begin swapping the event loops in the lsp
...
Run the preview in the main thread, as required for winit, and run the LSP
main loop in a secondary thread.
At least three more follow-up changes are needed, but this gets the
preview showing for example on macOS.
2021-04-06 10:40:34 +02:00
Olivier Goffart
0cd13d245d
LSP: better diagnostic reporting
...
Don't put the filename in the message, it is already there.
Also handle Warnings as Warnings
2021-04-04 14:48:50 +02:00
Olivier Goffart
309a9274e1
LSP: preview window
...
Currently not yet live preview from the open document content, but that should totaly be doable
2021-04-03 10:00:12 +02:00
Simon Hausmann
87b320f216
Fix LSP on Windows
...
Use `to_file_path` to extract the correct path. Just calling `path()` will return something
like `//%3a/Users/blah` instead of `c:\Users\blah`
2021-04-01 13:44:10 +02:00
Simon Hausmann
ffe4ba84b5
Fix LSP diagnostics not disappearing when fixed
...
To clear diagnostics we must send out empty ones. That means we must always send them for all loaded files and the main file.
2021-03-31 20:47:42 +02:00
Simon Hausmann
4a9cd954b8
Rework the Rust entry point API for the interpreter
...
Switch to the stateful `ComponentCompiler` concept that we discussed for the C++ API.
2021-03-18 18:20:50 +01:00
Simon Hausmann
3391aa0312
Remove the import resolve callback from the compiler configuration
...
Re-apply commit 2dcbc45cd6
but now do the
resolution from a relative import path to either an absolute path or url
in the compiler itself.
2021-03-16 14:21:33 +01:00
Simon Hausmann
e3a33dffe0
Revert "Remove the import resolve callback from the compiler configuration"
...
This reverts commit 2dcbc45cd6
.
It breaks loading of the printer demo in the editor because in
import_file we fail to return the absolute path and thus end up
importing common.60 too many times.
2021-03-16 11:43:33 +01:00
Simon Hausmann
2dcbc45cd6
Remove the import resolve callback from the compiler configuration
...
It turns out that this isn't really needed with the current
implementation.
2021-03-15 20:02:46 +01:00
Olivier Goffart
48333370a6
Use the new interpreter API in things that depends on it
2021-03-15 17:29:27 +01:00
Olivier Goffart
cae88f0823
Create a Diagnostic quen the main .60 file can't be loaded
2021-03-15 11:44:20 +01:00
Olivier Goffart
014e13b05f
Make Diagnostic field private
2021-03-15 10:37:24 +01:00
Olivier Goffart
730b1ccff2
Refactor diagnostic: Merge BuildDiagnostic and FileDiagnostic
2021-03-12 19:32:50 +01:00
Olivier Goffart
11e0be5130
Add the SourceLocation into the Diagnostic
2021-03-12 12:49:19 +01:00
Olivier Goffart
968dfaae87
Put what is the FileDiagnostics into the SourceFile so the SourceFile has the content
2021-03-11 16:23:46 +01:00
Simon Hausmann
409475aed2
Rename viewer --font=blah.ttf
to viewer --load-font=blah.ttf
2021-02-17 15:30:20 +01:00
Simon Hausmann
f30cb7f4d8
Add support for font_url
params to the online editor and previewer
2021-02-17 15:28:18 +01:00
Simon Hausmann
445ddd58d5
API cleanup
...
Remove the `application` infix from `register_application_font`, to
reduce the changes that it might be interpreted to be a function that
also changes the default font in all text elements.
2021-02-17 14:37:31 +01:00
Simon Hausmann
45fe6c3e8d
Add the ability to load application fonts by path
...
The viewer command line tool also gains the ability to specify them via `--app-font=/path/to/font.ttf` , which can be specified multiple times.
2021-02-17 14:16:52 +01:00
Simon Hausmann
7cea088a2c
Add support for letter-spacing in text
...
This is conveniently supported by femtovg and Qt
2021-02-16 22:14:50 +01:00
Olivier Goffart
1d1d42bec1
Figma import: fix images importing
2021-02-12 21:40:34 +01:00
Olivier Goffart
670bef069d
Figma import: Warning insted of generating wrong code for unsupported gradients
2021-02-12 20:47:59 +01:00
Olivier Goffart
36ecc19d3c
figma_import: import images in parallel
2021-02-12 20:47:59 +01:00
Olivier Goffart
9077cf86b0
Figma import: allow loading from cache and be more resillient when geometry is null
2021-02-12 20:47:59 +01:00
Olivier Goffart
1793ef4d77
Figma importer: linear gradients
2021-02-10 18:45:10 +01:00
Olivier Goffart
238ff9e92a
Figma import: Clip items with isMask
2021-02-10 17:32:08 +01:00
Olivier Goffart
c3a4095c35
Figma import: line
2021-02-10 17:17:25 +01:00
Olivier Goffart
203a18d958
Figma import: add clip
2021-02-10 14:54:53 +01:00
Olivier Goffart
6b162dac9e
Figma importer: Fix the border radius
2021-02-10 14:40:36 +01:00
Olivier Goffart
3c50f13c2a
Figma import: make use of Path::fill-rule
2021-02-10 14:21:42 +01:00
Olivier Goffart
600186220c
Some work towards a figma importer
2021-02-10 12:49:59 +01:00
Olivier Goffart
ec90d0c525
wasm: Resize the canvas to make sure it fits the window constraints
2021-02-09 09:41:01 +01:00
Olivier Goffart
b155dbe601
Add a preview.html to the online code editor that only does the preview withtout the code editors
2021-02-08 11:36:49 +01:00
Olivier Goffart
fea2478859
Update version number everywhere
2021-01-28 16:34:13 +01:00
Olivier Goffart
82aa658cef
Update rowan
2021-01-28 15:37:01 +01:00
Olivier Goffart
23a511b380
Replace img!"..."
by @image-url("...")
2021-01-28 11:49:24 +01:00
Simon Hausmann
5f265ffc09
Split up ComponentWindow::run() into show(), hide() and sixtyfps::run_event_loop()
...
This allows creating multiple windows for example, and it will allow for
showing windows in those tests that require a mapped window.
As a bonus, the run() function on generated components is not consuming
anymore.
2021-01-19 09:50:22 +01:00
Olivier Goffart
57804b64a3
Don't use the canonical path for diagnostics
2020-12-28 15:07:49 +01:00
Olivier Goffart
9aca0b0a7e
LSP: Allow to access to the type loader documents
...
So that we can go to the definition of un-open documents
2020-12-28 12:48:32 +01:00
Olivier Goffart
60c3ceeaa8
Silent warning
2020-12-28 12:48:32 +01:00
Olivier Goffart
2a43575528
Fix license header check
...
By removing files that needn't to be checked in or adding the right header
2020-12-23 18:08:43 +01:00
Olivier Goffart
b124826fd6
Make the goto definition actually works with vscode
2020-12-23 15:15:53 +01:00
Olivier Goffart
21a86de972
Make the sixtyFPS LSP server load from VSCode
2020-12-23 15:15:53 +01:00
Olivier Goffart
7fcb49bef1
Implement Go to definition for elements
2020-12-23 15:15:53 +01:00
Olivier Goffart
d0158bce78
More work on the LSP
2020-12-23 15:15:53 +01:00
Olivier Goffart
599c92c974
WIP LSP server skeletton
...
I can run it from Kate, but for some reason it does not work with VSCode yet
2020-12-23 15:15:53 +01:00
Olivier Goffart
0d2d48be4f
Rename "signal" to "callback"
2020-12-18 09:51:01 +01:00
Olivier Goffart
5a7fa5bf11
Add an option to generate dependency file
...
For issue #135
2020-12-15 18:13:16 +01:00