Stop the LSP from reporting progress information on file loading. This
caused problems with VSCode: First it triggered popups in the UI and
secondly it caused problems for the LSP that was asked to process
requests while calling back into the client.
Adapt the online editor and the two VSCode plugins to work with the
updated code.
Note: I did leave in the progress reporting code that can be used to
handle progress initiated by the _client_ side. That is just
notifications which will not block the LSP in any way and we might need
to support that at some point.
I did remove the Middleware code from the client side though that acted
on the progress information.
- Make the browser extention preview work
- Enable the properties tab on rust files
- Only call `offset_to_position_mapper` if the token is valid,
otherwise we might get an error visible in the UI.
... this gets rid of the remaining timeout and should make the whole
thing a bit more reliable.
It refreshes on *all* "done" messages from the LSP for now. I think this
is acceptable as the LSP is taking less than 10ms each time with the
printer demo (WASM).
This patch has no effect on the currently generated output (apart from a
dummy few lines in out/extension.js), but may help to avoid issues in
the future like we had last week, where esbuild processed an import from
"vscode-languageclient" and due to browser mode it picked the browser
version of the languageclient for out/extension.js that's running in the
node environment.
Do not interact with the language server directly in vscode, but use
vscode.commands.executeCommand(...) instead. The online_editor will of
course need to continue to interact with the language server directy, so
this unshares a bit of code. It is not too much and straight forward
code, so that is not too bad.
* Tools: trigger updates for properties view more often
So far you had to move the cursor to refresh the properties view after
start-up. This is no longer necessary.
Put the shared code into an NPM package. This makes especially vscode
much happier as it does not need to build code outside its project root
anymore:-)
I just noticed that I had broken the package build before by updating
the types downloaded for vscode. Those types need to be in sync with
the vscode engine version!
Hard-code both to 1.70 for now, I think that is old enough to cover most
installaions of VSCode (which tend to be very new in my experience).