Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Language server doesn't work: server shut down #4

Open
whiterock opened this issue May 21, 2024 · 2 comments
Open

Language server doesn't work: server shut down #4

whiterock opened this issue May 21, 2024 · 2 comments
Labels
external:lsp Related to LanguageServer.jl

Comments

@whiterock
Copy link

I am on Zed 0.133.7 (622f0884d6e364deacdf31767632b29a5d216201). The extension version is v0.1.1

Apart from the syntax highlighting nothings work for me. Go to definition does nothing. All variables inside functions report "Julia: Missing reference: ", etc.

The following is a subset of the logs. (many more lines with identical error messages are present)

2024-05-21T13:48:38+02:00 [WARN] Generic lsp request to julia failed: server shut down
2024-05-21T13:48:38+02:00 [ERROR] crates/project/src/project.rs:6949: server shut down
2024-05-21T13:48:39+02:00 [ERROR] crates/editor/src/editor.rs:8417: failed to format via language server

Caused by:
server shut down
2024-05-21T13:48:39+02:00 [ERROR] crates/project/src/project.rs:2710: sending into a closed channel

I have also installed the Julia Language Server (https://github.com/julia-vscode/LanguageServer.jl)

Are there any steps I have not followed here or could anyone provide me with "installation instructions" or the like?

Thanks in advance,
whiterock

@piechologist
Copy link
Collaborator

You shouldn't need to install anything. This extension adds LanguageServer.jl to a new Julia environment zed-julia and starts it when you open a .jl file in Zed. Your .jl file must be in a local Julia package e.g., myproject/src/foo.jl and you need a myproject/Project.toml. So, just the basic stuff. There's not even anything we could configure.

Having said that, I've seen the LS crashing many times as well (just as in your post). Sometimes you can restart it with the Zed command restart language server.

@christiankral
Copy link

You shouldn't need to install anything. This extension adds LanguageServer.jl to a new Julia environment zed-julia and starts it when you open a .jl file in Zed. Your .jl file must be in a local Julia package e.g., myproject/src/foo.jl and you need a myproject/Project.toml. So, just the basic stuff. There's not even anything we could configure.

On my opinion it does also make sense to support standalone Julia files without a strict project structure. I am using a lot of such files to evaluate data in the devlopement process before completing a project.

However, I do understand that package version dependency can only be maintained by a full Julia project structure. Yet, most of the my Julia files (under development) I use, work with the latest version of the used packages. I am thus wondering if zed-julia could also support standalone files, as the package (but not version) dependencies are specified by using.

@savq savq changed the title Extension simply does not work for me Language server doesn't work: server shut down Aug 28, 2024
@savq savq added the external:lsp Related to LanguageServer.jl label Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external:lsp Related to LanguageServer.jl
Projects
None yet
Development

No branches or pull requests

4 participants