Commit graph

3086 commits

Author SHA1 Message Date
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
Simon Hausmann
6b90d58d74
Add missing dependencies 2021-04-04 20:55:00 +02:00
Olivier Goffart
723b39c59a Wasm don't have threads anyway, so don't create a GLOBAL_PROXY that needs to be sync 2021-04-04 16:58:26 +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
d76ee8371f Fix warning when Qt is not built 2021-04-03 10:23:41 +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
Olivier Goffart
c3046f5a55 Add a way to send an event to the GUI thread from any thread
The idea is that the callback is meant to be run in the gui thread

(untested)
2021-04-03 10:00:12 +02:00
Olivier Goffart
162944b8c9 Add ability in the interpreter to re-use an existing window 2021-04-03 10:00:12 +02:00
Simon Hausmann
4be8f16e04
Fix artifact download names 2021-04-02 18:15:50 +02:00
Simon Hausmann
ceb2fc3897
Another attempt at fixing macOS sdk selection 2021-04-02 18:09:35 +02:00
Simon Hausmann
546c58ba02
Try to fix aarch64 apple build
Try to select an SDK that supports
2021-04-02 17:43:48 +02:00
Simon Hausmann
a5e18c9511
Another attempt at getting cross builds to work 2021-04-02 14:53:45 +02:00
Simon Hausmann
8bd3dfc647
Try to copy the lsp binary out of the correct directory 2021-04-02 14:44:51 +02:00
Simon Hausmann
2f93df1613
Another attempt at fixing toolchain selection 2021-04-02 14:32:58 +02:00
Simon Hausmann
81d1bf23a3
Prospective target build fix
The attribute to the cargo action seems to be toolchain
2021-04-02 14:28:38 +02:00
Simon Hausmann
0508ce8334
Fix aarch name
Forgot the 64 suffix
2021-04-02 14:19:19 +02:00
Simon Hausmann
5337b1d103 Limit lsp build 2021-04-02 14:13:41 +02:00
Simon Hausmann
2378efb34e Fix yaml syntax 2021-04-02 14:12:34 +02:00
Simon Hausmann
463b08e779 Try to add an aarch64 darwin build 2021-04-02 14:11:53 +02:00
Simon Hausmann
c4f615479c Prepare for supporting aarch64 for apple m1 in extension.ts 2021-04-02 13:02:29 +02:00
Simon Hausmann
f088ca41f0 Remove rust/cross install from vscode extension build
That's not needed anymore
2021-04-02 12:57:46 +02:00
Simon Hausmann
606f97dd84 Fix lsp binary unpacking
Try to place them straight into the bin/ directory
2021-04-02 12:45:55 +02:00
Simon Hausmann
834d43bf91 More fixes towards getting the binaries included
* Try to fix up permissions after artifact extraction
* Place the binary into the directory where the archiver expects it
2021-04-02 12:37:27 +02:00
Simon Hausmann
e9d534e48c Fix artifact directory setup
Copy the binary from the target/release directory, not the root.
2021-04-02 12:32:10 +02:00
Simon Hausmann
5964ed83e7 Make sure to check out the sources before building the lsp 2021-04-02 12:28:15 +02:00
Simon Hausmann
94a9cc3c1f Fix github action job dependency name 2021-04-02 12:26:02 +02:00
Simon Hausmann
4de5ba862a Fix yaml syntax 2021-04-02 12:25:12 +02:00
Simon Hausmann
1cd49b93bb Some work towards including macos binaries in the vscode extension
Github Actions does not support docker on macos hosts, so we can't use cross.
Instead try to use separate github action builds and artifacts to share the lsp binary creation.
2021-04-02 12:24:03 +02:00
Simon Hausmann
b654646722 Change the window property update event to use a window id
This will hopefully enable the custom event to be sendable across threads.
2021-04-02 12:00:32 +02:00
Simon Hausmann
f0bda6a3be
Re-enable macOS for vscode extension build
Seems it’s back up online
2021-04-01 18:05:42 +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
6e3efbd3ec Fix launching the lsp server on Windows when debugging
When looking in ../target/debug we need to add the .exe extension
2021-04-01 13:35:44 +02:00
Olivier Goffart
6b0f2f698b Placeholder for the preview in the vscode extension 2021-04-01 13:24:13 +02:00
Simon Hausmann
4be03660d8 Install cross in the vscode extension build action 2021-04-01 13:14:45 +02:00
Simon Hausmann
c00c502c0e Prospective fix for vsce package failure
Make sure to install dependencies
2021-04-01 13:08:55 +02:00
Simon Hausmann
55e433cf5e Fix linux host tag in github action
Oops :-)
2021-04-01 12:59:14 +02:00
Simon Hausmann
c957f4e795 Switch to a Linux host
The Github osx builders are down, so switch to Linux as that'll at least
make it possible to test the rest of the action.
2021-04-01 12:58:03 +02:00
Simon Hausmann
27ee7b0758 Try to avoid doing cross builds on Linux 2021-04-01 12:57:01 +02:00
Simon Hausmann
326f066627 Fix github action step name 2021-04-01 12:42:54 +02:00
Simon Hausmann
bf9916d5eb Fix VS code extension license header
Not sure why the formatter ended up using tabs :(
2021-04-01 12:41:49 +02:00
Simon Hausmann
561e1259d1 First attempt at automated build
Todo: Detect a Linux host and use a regular native build instead of cross.
2021-04-01 12:41:49 +02:00
Olivier Goffart
72931aff74 Add some (yet to implement) preview commands 2021-04-01 12:28:20 +02:00
Olivier Goffart
12a098856e Fix TS warnings
vscode is strict about style
2021-04-01 12:22:00 +02:00
Olivier Goffart
eec918e95a Instruction to run the vscode extension 2021-04-01 12:12:04 +02:00
Simon Hausmann
e754903325 Try to bundle the lsp server in the vscode extension package
The rust binary creation is not automated yet though.
2021-04-01 11:38:57 +02:00
Simon Hausmann
05a8bbad8f Work around css-color-parser2 bug 2021-04-01 10:03:39 +02:00
Simon Hausmann
a5a820567c Add missing publisher/repo fields
To silence `vsce package`
2021-04-01 09:59:20 +02:00
Olivier Goffart
f13a46fd13 Remove file which was not meant to be added to git
Other demo don't include the package-lock. This was added by mistake
when the demo was renamed
2021-04-01 08:36:24 +02:00