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

Julia support #121

Open
panbroggi opened this issue Apr 12, 2024 · 3 comments
Open

Julia support #121

panbroggi opened this issue Apr 12, 2024 · 3 comments

Comments

@panbroggi
Copy link

Good morning,

I am a Julia user, and I would like to test the LSP server plugin. I tried editing my config file according to #107, but the server is continuously restarted.

Do you have an idea of how I can troubleshoot this?

Thank you for your help. I pasted the log, in case it might help.

Fri Apr 12 15:14:10 2024 [INFO] [LSP]: julia_ls was shutdown, revise your configuration at /home/lbroggi/.config/lite-xl/plugins/lsp/init.lua:792
Fri Apr 12 15:14:10 2024 [INFO] [LSP] starting julia_ls at /home/lbroggi/.config/lite-xl/plugins/lsp/init.lua:774
Fri Apr 12 15:14:10 2024 [INFO] [LSP/julia_ls]: Registering listener for 'workspace/configuration' requests
 at /home/lbroggi/.config/lite-xl/plugins/lsp/init.lua:783
Fri Apr 12 15:14:10 2024 [INFO] [LSP/julia_ls]: Registering listener for 'window/showDocument' requests
 at /home/lbroggi/.config/lite-xl/plugins/lsp/init.lua:783
Fri Apr 12 15:14:10 2024 [INFO] [LSP/julia_ls]: Registering listener for 'window/logMessage' messages
 at /home/lbroggi/.config/lite-xl/plugins/lsp/init.lua:783
Fri Apr 12 15:14:10 2024 [INFO] [LSP/julia_ls]: Registering listener for 'textDocument/publishDiagnostics' messages
 at /home/lbroggi/.config/lite-xl/plugins/lsp/init.lua:783
Fri Apr 12 15:14:10 2024 [INFO] [LSP/julia_ls]: Registering listener for 'window/showMessage' messages
 at /home/lbroggi/.config/lite-xl/plugins/lsp/init.lua:783
Fri Apr 12 15:14:10 2024 [INFO] [LSP/julia_ls]: Listening for event 'initialized'
 at /home/lbroggi/.config/lite-xl/plugins/lsp/init.lua:783
Fri Apr 12 15:14:10 2024 [INFO] [LSP/julia_ls]: Adding request initialize
 at /home/lbroggi/.config/lite-xl/plugins/lsp/init.lua:783
Fri Apr 12 15:14:10 2024 [INFO] [LSP]: julia_ls automatically restarted at /home/lbroggi/.config/lite-xl/plugins/lsp/init.lua:805
Fri Apr 12 15:14:10 2024 [INFO] [LSP/julia_ls]: Sent request 'initialize':
{"method":"initialize","params":{"processId":14688,"clientInfo":{"version":"2.1.3","name":"Lite XL"},"capabilities":{"textDocument":{"synchronization":{"didSave":true},"hover":{"contentFormat":["markdown","plaintext"]},"completion":{"completionItem":{"resolveSupport":{"properties":["documentation","detail"]},"snippetSupport":true,"documentationFormat":["plaintext"],"insertReplaceSupport":true},"completionItemKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,17,18,19,20,21,22,23,24,25]}},"signatureHelp":{"signatureInformation":{"documentationFormat":["plaintext"]}},"documentSymbol":{"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]}}},"workspace":{"configuration":true},"general":{"positionEncodings":["utf-16"]},"window":{"showDocument":{"support":true}}},"initializationOptions":{},"workspaceFolders":[{"name":"lbroggi","uri":"file:///home/lbroggi"}],"rootPath":"/home/lbroggi","rootUri":"file:///home/lbroggi"},"id":1,"jsonrpc":"2.0"}
 at /home/lbroggi/.config/lite-xl/plugins/lsp/init.lua:783
Fri Apr 12 15:14:12 2024 [INFO] Closed doc "logs.txt" at /opt/lite-xl/data/core/doc/init.lua:674
Fri Apr 12 15:14:21 2024 [INFO] [LSP/julia_ls]: Failed sending request 'initialize' with error: unknown
{"method":"initialize","params":{"processId":14688,"clientInfo":{"version":"2.1.3","name":"Lite XL"},"capabilities":{"textDocument":{"synchronization":{"didSave":true},"hover":{"contentFormat":["markdown","plaintext"]},"completion":{"completionItem":{"resolveSupport":{"properties":["documentation","detail"]},"snippetSupport":true,"documentationFormat":["plaintext"],"insertReplaceSupport":true},"completionItemKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,17,18,19,20,21,22,23,24,25]}},"signatureHelp":{"signatureInformation":{"documentationFormat":["plaintext"]}},"documentSymbol":{"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]}}},"workspace":{"configuration":true},"general":{"positionEncodings":["utf-16"]},"window":{"showDocument":{"support":true}}},"initializationOptions":{},"workspaceFolders":[{"name":"lbroggi","uri":"file:///home/lbroggi"}],"rootPath":"/home/lbroggi","rootUri":"file:///home/lbroggi"},"id":1,"jsonrpc":"2.0"}
 at /home/lbroggi/.config/lite-xl/plugins/lsp/init.lua:783
Fri Apr 12 15:14:21 2024 [INFO] [LSP]: julia_ls was shutdown, revise your configuration at /home/lbroggi/.config/lite-xl/plugins/lsp/init.lua:792
Fri Apr 12 15:14:21 2024 [INFO] [LSP] starting julia_ls at /home/lbroggi/.config/lite-xl/plugins/lsp/init.lua:774
Fri Apr 12 15:14:21 2024 [INFO] [LSP/julia_ls]: Registering listener for 'workspace/configuration' requests
 at /home/lbroggi/.config/lite-xl/plugins/lsp/init.lua:783
Fri Apr 12 15:14:21 2024 [INFO] [LSP/julia_ls]: Registering listener for 'window/showDocument' requests
 at /home/lbroggi/.config/lite-xl/plugins/lsp/init.lua:783
Fri Apr 12 15:14:21 2024 [INFO] [LSP/julia_ls]: Registering listener for 'window/logMessage' messages
 at /home/lbroggi/.config/lite-xl/plugins/lsp/init.lua:783
Fri Apr 12 15:14:21 2024 [INFO] [LSP/julia_ls]: Registering listener for 'textDocument/publishDiagnostics' messages
 at /home/lbroggi/.config/lite-xl/plugins/lsp/init.lua:783
Fri Apr 12 15:14:21 2024 [INFO] [LSP/julia_ls]: Registering listener for 'window/showMessage' messages
 at /home/lbroggi/.config/lite-xl/plugins/lsp/init.lua:783
Fri Apr 12 15:14:21 2024 [INFO] [LSP/julia_ls]: Listening for event 'initialized'
 at /home/lbroggi/.config/lite-xl/plugins/lsp/init.lua:783
Fri Apr 12 15:14:21 2024 [INFO] [LSP/julia_ls]: Adding request initialize
 at /home/lbroggi/.config/lite-xl/plugins/lsp/init.lua:783
Fri Apr 12 15:14:21 2024 [INFO] [LSP]: julia_ls automatically restarted at /home/lbroggi/.config/lite-xl/plugins/lsp/init.lua:805
Fri Apr 12 15:14:21 2024 [INFO] [LSP/julia_ls]: Sent request 'initialize':
{"method":"initialize","params":{"processId":14688,"clientInfo":{"version":"2.1.3","name":"Lite XL"},"capabilities":{"textDocument":{"synchronization":{"didSave":true},"hover":{"contentFormat":["markdown","plaintext"]},"completion":{"completionItem":{"resolveSupport":{"properties":["documentation","detail"]},"snippetSupport":true,"documentationFormat":["plaintext"],"insertReplaceSupport":true},"completionItemKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,17,18,19,20,21,22,23,24,25]}},"signatureHelp":{"signatureInformation":{"documentationFormat":["plaintext"]}},"documentSymbol":{"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]}}},"workspace":{"configuration":true},"general":{"positionEncodings":["utf-16"]},"window":{"showDocument":{"support":true}}},"initializationOptions":{},"workspaceFolders":[{"name":"lbroggi","uri":"file:///home/lbroggi"}],"rootPath":"/home/lbroggi","rootUri":"file:///home/lbroggi"},"id":1,"jsonrpc":"2.0"}
 at /home/lbroggi/.config/lite-xl/plugins/lsp/init.lua:783
Fri Apr 12 15:14:24 2024 [INFO] Opened doc "logs.txt" at /opt/lite-xl/data/core/init.lua:1148
@PerilousBooklet
Copy link
Contributor

The problem was solved in julia-vscode/LanguageServer.jl#1271, but you have to wait for the next release to be able to use it.

@PerilousBooklet
Copy link
Contributor

Also, I forgot to downgrade the status from Works to Works with julia lsp fix (#1271)

@Guldoman
Copy link
Member

If you use the master version of this plugin, you can workaround the issue with something like:

lsp.add_server {
  name = "julia_ls",
  language = "julia",
  file_patterns = { "%.jl$", "%.julia$" },
  command = { "julia", "--startup-file=no", "--history-file=no", "--quiet", "-e", "using LanguageServer; runserver()" },
  -- This is the temporary fix:
  custom_capabilities = { window = { workDoneProgress = false } },
  verbose = false
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants