sveltejs / language-tools

The Svelte Language Server, and official extensions which use it
MIT License
1.22k stars 196 forks source link

VsCode Extension not working #504

Closed seveneye closed 4 years ago

seveneye commented 4 years ago

Hello, I've used the starter template, ran the typescript script and install the vscode extension. This is a very fresh project so no other svelte extension. No features seem to be working - no hover, format etc. Currently installed the 101.11.1. Any ideas?

Also tried the restart ls- command 'svelte.restartLanguageServer' not found. Have i missed something?

488 doesnt seem to help

dummdidumm commented 4 years ago

Did you follow the setup instructions to make sure you don't have an old extension version installed and also don't have Svelte associated to HTML files?

seveneye commented 4 years ago

@dummdidumm yup. i did'nt have those file association and ran the cmd script to uninstall any previous version. Still not working tho.

dummdidumm commented 4 years ago

Could you have a look at Output->Svelte and paste in here what's logged there?

seveneye commented 4 years ago

Nothing. Just the pop up errors

image

dummdidumm commented 4 years ago

In that drop-down menu where in the screen "Tasks" is shown, is there no "Svelte" entry? To me this sounds like installation is broken and you may need to reinstall the extension.

seveneye commented 4 years ago

@dummdidumm thanks for your help! I was getting this error The language client requires VS Code version ^1.41.0 but received version 1.38.1

I think I disabled vs code auto update due to a bug before. Updated it then it worked! I suggest to include this in the template docs if it is really the required vs code version. Thanks again!

dummdidumm commented 4 years ago

I never knew about the requirements before. I did some reading and it's the vscode-language-server-node package that has this requirement. Thanks for noticing! I'll add something to the docs.

MiraiSubject commented 1 year ago

I started running into this issue on vscode recently again. Attempting to restart the server results in the following:

CleanShot 2023-05-11 at 17 09 58

OS: macOS Ventura 13.1 Code info:

Version: 1.78.1 (Universal) Commit: 6a995c4f4cc2ced6e3237749973982e751cb0bf9 Date: 2023-05-04T09:57:42.343Z (1 wk ago) Electron: 22.5.1 Chromium: 108.0.5359.215 Node.js: 16.17.1 V8: 10.8.168.25-electron.0 OS: Darwin arm64 22.2.0 Sandboxed: No

extensions.json:

[
    {
        "identifier": {
            "id": "svelte.svelte-vscode",
            "uuid": "c5463f77-75d9-4a25-8cc4-d8541a461285"
        },
        "version": "107.4.3",
        "location": {
            "$mid": 1,
            "fsPath": "/Users/subject/.vscode/extensions/svelte.svelte-vscode-107.4.3",
            "path": "/Users/subject/.vscode/extensions/svelte.svelte-vscode-107.4.3",
            "scheme": "file"
        },
        "relativeLocation": "svelte.svelte-vscode-107.4.3",
        "metadata": {
            "id": "c5463f77-75d9-4a25-8cc4-d8541a461285",
            "publisherId": "c3bf51ad-baaa-466c-952c-9c3ca9bfabed",
            "publisherDisplayName": "Svelte",
            "targetPlatform": "undefined",
            "updated": false,
            "isPreReleaseVersion": false,
            "installedTimestamp": 1683816825370,
            "preRelease": false
        }
    }
]

settings.json:

{
    "terminal.integrated.env.osx": {
        "FIG_NEW_SESSION": "1"
    },
    "workbench.sideBar.location": "right",
    "editor.inlineSuggest.enabled": true,
    "editor.accessibilitySupport": "off",
    "workbench.colorTheme": "Catppuccin Frappé",
    "editor.fontFamily": "FiraCode Nerd Font, Menlo, Monaco, 'Courier New', monospace",
    "terminal.integrated.fontFamily": "FiraCode Nerd Font",
    "[typescript]": {
        "editor.defaultFormatter": "vscode.typescript-language-features"
    },
    "redhat.telemetry.enabled": false,
    "[json]": {
        "editor.defaultFormatter": "vscode.json-language-features"
    },
    "[jsonc]": {
        "editor.defaultFormatter": "vscode.json-language-features"
    },
    "[javascript]": {
        "editor.defaultFormatter": "vscode.typescript-language-features"
    },
    "window.commandCenter": true,
    "workbench.productIconTheme": "fluent-icons",
    "workbench.iconTheme": "material-icon-theme",
    "github.copilot.enable": {
        "*": true,
        "plaintext": false,
        "markdown": false,
        "scminput": false,
        "typescript": true,
    },
    "html.autoClosingTags": false,
    "svelte.language-server.debug": true,
    "svelte.trace.server": "verbose"
}

(I cleared out all my extensions and then reinstalled Svelte for VS Code only so I can trouble troubleshoot this, so I'm aware some of these settings don't do anything right now)

I also run into this issue on insider vscode, however earlier today when I installed it, it was working fine, not sure what happened in between unless I can find out how to extract the logs.

Version: 1.79.0-insider (Universal) Commit: 02298ef4180f2a5db39e0cb6288382860b96a596 Date: 2023-05-11T05:26:00.234Z Electron: 22.5.2 Chromium: 108.0.5359.215 Node.js: 16.17.1 V8: 10.8.168.25-electron.0 OS: Darwin arm64 22.2.0 Sandboxed: Yes

How would I go about getting log files for the svelte language server/extension specifically?

Edit: this also happens in Github Codespaces:

CleanShot 2023-05-11 at 19 10 54

Found a codespaces repro too:

  1. Use this template in codespaces: https://github.com/sveltejs/kit-template-default
  2. Let it finish the npm install and run build process
  3. Install the Svelte for VS Code extension
  4. Open the command palette and choose "Svelte: Restart Language Server"
JoshJarabek7 commented 12 months ago

@MiraiSubject I'm also running into this issue as well and I'm also on MacOS. Did you ever figure out how to fix it?

magicspon commented 11 months ago

Also seeing this

MiraiSubject commented 10 months ago

@MiraiSubject I'm also running into this issue as well and I'm also on MacOS. Did you ever figure out how to fix it?

Sorry unfortunately I never figured it out.

kylesloper commented 9 months ago

Also seeing this on Win10 x64

F4YKING commented 7 months ago

Also seeing this on Win11 x64 image

magicspon commented 7 months ago

I resolved this by removing svelte from the vs code html file list