Closed fuzing closed 1 year ago
Hi! Thanks for the report. Would it be possible for you the attach the exact file that reproduces this for you? (Copy and paste from the issue produces a file that works for me)
I suspect that it's something perhaps related to the content, maybe some stray BOM marker or so.
Alternatively, if you clone the Slint repo and open examples/gallery/gallery.slint and click on "show preview", do you get the same error?
Just tried cloning the repo and got the same error (also sent you my file via a separate email).
Just in case, here are my VS-code specs:
Version: 1.81.1 Commit: 6c3e3dba23e8fadc360aed75ce363ba185c49794 Date: 2023-08-09T22:18:39.991Z Electron: 22.3.18 ElectronBuildId: 22689846 Chromium: 108.0.5359.215 Node.js: 16.17.1 V8: 10.8.168.25-electron.0 OS: Linux x64 6.2.0-31-generic
Okay, this is really bizarre. The demo.slint that you sent me works for me, too - on a stock Ubuntu 23.04 (but 22.04 should not make a difference). The fact that you see this also on gallery.slint excludes the possibility of this being a corrupted file or so.
Since you cloned the repo, could you try the following?
cargo run --bin slint-viewer -- ./examples/gallery/gallery.slint
What's the output of the locale
command for you?
I can reproduce: This happens when using the "Slint: show preview" from the command palette, but not the preview lense to preview a single component.
Thanks for reporting the bug
Ahh, it's the command from the command palette that's not working. Indeed!
So the best workaround at this point is not to use the command from the palette but to click on "show preview" via the code sense:
Appreciate the quick followup - that works for me too - an easy workaround! Closing this out in lieu of #3418 - Thank you!
So the best workaround at this point is not to use the command from the palette but to click on "show preview" via the code sense
There is no code sense for me in my Slint file. I tested and neither the nightly or non-nightly versions work in the command pallete, and there is no code sense above the component. How can i fix this?
@jasper-at-windswept: That suggests that the Slint LSP is not running at all :-/
Can you please check the Output
pane in VSCode (bottom). There should be "Slint LSP" in the dropdown on the right side of the top bar. Is there anything suspicious in there about slint-lsp failing to start? I run VScose in a minimum install environment and for me slint-lsp
likes to error out due to a missing libinput
.
@hunger ~I just checked and the output shows the below:~ ~[Error - 9:34:30 PM] Slint LSP client: couldn't create connection to server. Message: write EPIPE Code: -32099 [Error - 9:34:30 PM] Restarting server failed Message: write EPIPE Code: -32099 [Error - 9:34:30 PM] The Slint LSP server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information. Could not start dynamically linked executable: /home/allusive/.vscode-oss/extensions/slint.slint-1.4.1-universal/bin/slint-lsp-x86_64-unknown-linux-gnu NixOS cannot run dynamically linked executables intended for generic linux environments out of the box. For more information, see:~
Good News, i resolved the issue of the lsp not starting by setting up Nix-ld. For any other nix users here in the future just add the below to your configuration.nix
programs = {
nix-ld = {
enable = true;
libraries = with pkgs; [
stdenv.cc.cc
fuse3
openssl
curl
libxkbcommon
libudev-zero
libappindicator-gtk3
libdrm
libglvnd
libusb1
libuuid
libxml2
libinput
mesa
fontconfig
freetype
];
};
};
HOWEVER I now have this bug, #4619
We're unable to get even the simplest live preview to work with VS-code under linux
This simple demo runs fine with cargo run/build/etc, but the live-preview in vs-code does not.
When in the ui/demo.slint file (below), and using: Slint: Show Preview from the VS code command palette, the following error appears in the problems tab:
Syntax error: expected identifier [Ln 19, Col 37] Where line number 19 is after EOF for the ui/demo.slint file
No preview window appears
Dev Machine Config: i9 X86_64 - 64GB memory Ubuntu 22.04 with current updates rustc and cargo 1.71.1 VS code slint plugin v1.2.0 (nightly also fails in the same way)