zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
49.58k stars 3.04k forks source link

Language servers stuck in `downloading`/`updating` status #12570

Closed xcrap closed 3 months ago

xcrap commented 5 months ago

Check for existing issues

Describe the bug / provide steps to reproduce it

Recently when editing js files I have ocasional warnings saying Downloading eslint.... and it's there forever! But this happens once in a while when I'm editing JS files, I cannot tell the exact behaviour why it starts, it just does sometimes and then it does not disappear but sometimes It does never shows. I've installed Biome but it already happened before that, also I'm having some typescript warnings on JS files, is typescript-language-server running for JS or only prettier or eslint ?

Environment

Zed: v0.137.6 (Zed) OS: macOS 14.5.0 Memory: 16 GiB Architecture: aarch64

If applicable, add mockups / screenshots to help explain present your vision of the feature

Screenshot 2024-06-02 at 01 52 19

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

2024-06-02T01:54:19+00:00 [INFO] starting language servers for TypeScript: typescript-language-server, eslint, biome 2024-06-02T01:54:19+00:00 [INFO] starting language server "eslint", path: "/Users/xcrap/node_modules/typescript/lib/lib.dom.d.ts", id: 29 2024-06-02T01:54:19+00:00 [INFO] starting language server "biome", path: "/Users/xcrap/node_modules/typescript/lib/lib.dom.d.ts", id: 30 2024-06-02T01:54:19+00:00 [INFO] fetching latest version of language server "eslint" 2024-06-02T01:54:19+00:00 [INFO] downloading language server "eslint" 2024-06-02T01:54:19+00:00 [INFO] Node runtime install_if_needed 2024-06-02T01:54:19+00:00 [INFO] Node runtime install_if_needed 2024-06-02T01:54:19+00:00 [INFO] starting language server. binary path: "/Users/xcrap/Library/Application Support/Zed/node/node-v18.15.0-darwin-arm64/bin/node", working directory: "/Users/xcrap/node_modules/typescript/lib", args: ["/Users/xcrap/Library/Application Support/Zed/languages/eslint/vscode-eslint-release/2.4.4/vscode-eslint/server/out/eslintServer.js", "--stdio"] 2024-06-02T01:54:19+00:00 [INFO] Language server with id 29 sent unhandled notification window/logMessage: { "type": 3, "message": "ESLint server running in node v18.15.0" } 2024-06-02T01:54:19+00:00 [INFO] Language server with id 29 sent unhandled notification eslint/noLibrary: { "source": { "uri": "file:///Users/xcrap/node_modules/typescript/lib/lib.dom.d.ts" } } 2024-06-02T01:54:20+00:00 [INFO] Node runtime install_if_needed 2024-06-02T01:54:20+00:00 [INFO] starting language server. binary path: "/Users/xcrap/Library/Application Support/Zed/node/node-v18.15.0-darwin-arm64/bin/node", working directory: "/Users/xcrap/node_modules/typescript/lib", args: ["/Users/xcrap/Library/Application Support/Zed/extensions/work/biome/node_modules/@biomejs/biome/bin/biome", "lsp-proxy"] 2024-06-02T01:54:20+00:00 [WARN] language server 30: failed to unregister workspace/DidChangeWatchedFiles capability with id biome_did_change_workspace_settings. not registered. 2024-06-02T01:54:20+00:00 [WARN] language server 30: failed to unregister workspace/DidChangeWatchedFiles capability with id biome_did_change_workspace_settings. not registered. 2024-06-02T01:54:20+00:00 [ERROR] crates/lsp/src/lsp.rs:779: oneshot canceled 2024-06-02T01:54:20+00:00 [ERROR] crates/lsp/src/lsp.rs:779: oneshot canceled 2024-06-02T01:54:20+00:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense 2024-06-02T01:54:20+00:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense 2024-06-02T01:54:20+00:00 [INFO] starting language servers for JavaScript: typescript-language-server, tailwindcss-language-server, eslint, biome 2024-06-02T01:54:20+00:00 [INFO] starting language servers for JavaScript: typescript-language-server, tailwindcss-language-server, eslint, biome 2024-06-02T01:54:20+00:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense 2024-06-02T01:54:20+00:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense 2024-06-02T01:54:20+00:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense 2024-06-02T01:54:20+00:00 [INFO] starting language servers for JavaScript: typescript-language-server, tailwindcss-language-server, eslint, biome 2024-06-02T01:54:20+00:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense 2024-06-02T01:54:20+00:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense 2024-06-02T01:54:20+00:00 [INFO] starting language servers for JavaScript: typescript-language-server, tailwindcss-language-server, eslint, biome 2024-06-02T01:54:20+00:00 [INFO] starting language servers for JavaScript: typescript-language-server, tailwindcss-language-server, eslint, biome 2024-06-02T01:54:20+00:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense 2024-06-02T01:54:20+00:00 [ERROR] crates/project/src/project.rs:3405: no worktree found for diagnostics path "/Users/xcrap/node_modules/typescript/lib/lib.dom.d.ts" 2024-06-02T01:54:20+00:00 [ERROR] crates/project/src/project.rs:3405: no worktree found for diagnostics path "/Users/xcrap/node_modules/typescript/lib/lib.dom.d.ts" 2024-06-02T01:54:20+00:00 [INFO] language server 28: unregistered workspace/DidChangeWatchedFiles capability with id biome_did_change_workspace_settings 2024-06-02T01:54:20+00:00 [INFO] language server 9: unregistered workspace/DidChangeWatchedFiles capability with id biome_did_change_workspace_settings 2024-06-02T01:54:20+00:00 [INFO] language server 14: unregistered workspace/DidChangeWatchedFiles capability with id biome_did_change_workspace_settings 2024-06-02T01:54:20+00:00 [INFO] Language server with id 13 sent unhandled notification eslint/noLibrary: { "source": { "uri": "file:///Users/xcrap/htdocs/carolinalino/admin/sources/custom_sortableGallery.js" } } 2024-06-02T01:54:20+00:00 [INFO] Language server with id 27 sent unhandled notification eslint/noLibrary: { "source": { "uri": "file:///Users/xcrap/htdocs/micauto/admin/sources/custom.js" } } 2024-06-02T01:54:20+00:00 [INFO] Language server with id 8 sent unhandled notification eslint/noLibrary: { "source": { "uri": "file:///Users/xcrap/htdocs/micmoto/admin/sources/custom_sortableGallery.js" } } 2024-06-02T01:54:20+00:00 [INFO] Language server with id 8 sent unhandled notification eslint/noLibrary: { "source": { "uri": "file:///Users/xcrap/htdocs/micmoto/admin/sources/custom.js" } } 2024-06-02T01:54:20+00:00 [INFO] Language server with id 27 sent unhandled notification eslint/noLibrary: { "source": { "uri": "file:///Users/xcrap/htdocs/micauto/admin/sources/custom_lightGallery.js" } } 2024-06-02T01:54:20+00:00 [INFO] Language server with id 0 sent unhandled notification LogMessage: { "level": 1, "message": "[INFO] [ghostText] [2024-06-02T01:54:20.648Z] Cancelled during debounce", "metadataStr": "[INFO] [ghostText] [2024-06-02T01:54:20.648Z]", "extra": [ "Cancelled during debounce" ] } 2024-06-02T01:54:48+00:00 [ERROR] unexpected item event after pane was dropped 2024-06-02T01:57:32+00:00 [INFO] starting language servers for JavaScript: typescript-language-server, tailwindcss-language-server, eslint, biome 2024-06-02T01:57:33+00:00 [INFO] Language server with id 27 sent unhandled notification eslint/noLibrary: { "source": { "uri": "file:///Users/xcrap/htdocs/micauto/admin/sources/custom_sortableTable.js" } }

xcrap commented 5 months ago

Also it happens with checking for updates to Biome... as well.

miloxeon commented 5 months ago

Still not fixed?

benjaminwelch commented 4 months ago

I have a feeling this might be related. Every now and then I get this notice at the bottom:

Checking for updates to tailwindcss-language-server

Screenshot 2024-07-07 at 07 00 31

And it just stays there indefinitely. If I restart Zed, it will be gone for a bit and then come back. I found this in the log in case it's helpful:

2024-07-07T06:49:18-05:00 [INFO] starting language servers for JavaScript: vtsls, tailwindcss-language-server, eslint
2024-07-07T06:49:18-05:00 [INFO] Language server with id 3 sent unhandled notification eslint/noLibrary:
{
  "source": {
    "uri": "file:///Volumes/…"
  }
}
xcrap commented 4 months ago

Yeah, it's still doing the same thing and it happens with different language servers, I hope Zed does not become Neovim where you have to restart Language Servers every now and then.

xcrap commented 4 months ago
Screenshot 2024-07-09 at 16 14 10

Even with no files open, this happens. It's been months, and even though it's not apparently affecting anything, it feels like such an unfinished, buggy product.

jdewar commented 3 months ago

I am also running into this with the Elixir language server, now that there is no option to define a local script to run.

'Downloading lexical', 'Downloading elixir-ls', 'Downloading next-ls'. I never know which is going to show up. The LSP logs don't exist because nothing's started and the extent of Zed's logs are:

2024-07-22T13:27:11.318819Z [INFO] starting language servers for Elixir: next-ls, lexical, elixir-ls

Nothing more, same for HEEX. I looked through the source code, and saw that I could put a binary on the PATH, but lexical's 'binary' is a start_lexical.sh, and setting it on the PATH just didn't seem to work either; naming the script lexical didn't work either. I have tried putting !s in front of two of them, and cycled through all 3 as the only one to boot up, and none of them will download / boot.

Is there more logging that can be done to maybe find a cause?

jdewar commented 3 months ago

After some mindshare with a friend, I have managed to correctly rename the start_lexical.sh script to lexical and then start zed with the right path. However, none of the 3 Elixir LS servers will download/boot on their own in zed, currently. Not for me or a friend.

windlil commented 3 months ago

It's still happening

xcrap commented 3 months ago

In my case it's gone in latest version but also because of the detailed "language" settings.

For PHP I have this.

"PHP": { "format_on_save": { "language_server": { "name": "intelephense" } }, "formatter": { "language_server": { "name": "intelephense" } }, "language_servers": [ "intelephense", "!phpactor", "..." ] }

For everything else I'm using defaults, I'm also using the Emmet and Biome extensions which had problems in the start but this strict config appears to work. I just want to notice that Zed used to run smoothly without any specific settings, this is apparently not the case at least for PHP. Closing this issue.