typst-lsp icon indicating copy to clipboard operation
typst-lsp copied to clipboard

vscode extentions bug on NixOS

Open Jaggernaute opened this issue 2 years ago • 4 comments

  • Component: VSCode Extension
  • Extension version: v0.10.1
  • LSP version: v0.10.1
  • OS version and name: NixOS 23.05.20230921.55ac2a9 (Stoat)
  • I am on the latest stable version of the extension/LSP.
  • I have searched the issues of this repo and believe that this is not a duplicate.

Issue

Syntax highlighting isn't present in .typ files in VSCode on NixOS, my files are all gray, even if the text editor detects the language as Typst, and nothing happens on saving the document. The CLI tools works well ... I can compile ... I'm sorry if I can't give you more information right away, I'm not really a VSCode user, I primarily use the Jetbrains suite, so if I missed anything please ask me, so I can give you any information that I may have missed

Logs

[Info  - 6:36:21 PM] File written to /home/jaggi/Documents/tdd-stuff/demande-subvention-istic/letter_template.pdf
[Trace - 6:36:21 PM] Sending notification 'workspace/didChangeWatchedFiles'.
Params: {
    "changes": [
        {
            "uri": "file:///home/jaggi/Documents/tdd-stuff/demande-subvention-istic/letter_template.typ",
            "type": 2
        }
    ]
}


[Trace - 6:36:23 PM] Sending request 'textDocument/hover - (6)'.
Params: {
    "textDocument": {
        "uri": "file:///home/jaggi/Documents/tdd-stuff/demande-subvention-istic/letter_template.typ"
    },
    "position": {
        "line": 0,
        "character": 43
    }
}


[Trace - 6:36:23 PM] Received response 'textDocument/hover - (6)' in 0ms.
No result returned.

Jaggernaute avatar Oct 23 '23 16:10 Jaggernaute

the typst cli and typst-lsp are 2 different things.

typst-lsp use a bundled binary in the extension. generally bundled binary doesn't work on nixos because of ... nixos. I'd expect nix user are always familiar with elfpatch or something.

Enter-tainer avatar Oct 27 '23 04:10 Enter-tainer

I'd expect nix user are always familiar with elfpatch or something.

We all start somewhere ...

Jaggernaute avatar Oct 27 '23 12:10 Jaggernaute

@Jaggernaute are the logs you posted the complete logs? I'd expect more than just that. It looks like typst-lsp is aware of one of your documents, but I don't see where it was told about that document. There's also a lengthy initialization step that might hold information about this problem.

But given those logs, (as a non-NixOS expert) I don't think NixOS is directly responsible for this, since I'd otherwise expect it to crash before it got here :)

nvarner avatar Nov 01 '23 03:11 nvarner

Can you still reproduce this on the latest LSP version (0.11.0)? Did you download the Typst LSP extension from the VSCode marketplace, or did you compile from source? Did you change its configuration in any way? Are you using VSCode or VSCodium? And are you using Flatpak?

The LSP works fine for me (NixOS 23.05 as well, on VSCodium with and without Flatpak), so we will need more information to diagnose the problem you're facing.

PgBiel avatar Nov 18 '23 22:11 PgBiel