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

[feature request] Julialang support #354

Open
honghuzi opened this issue Sep 16, 2022 · 5 comments
Open

[feature request] Julialang support #354

honghuzi opened this issue Sep 16, 2022 · 5 comments
Labels
help wanted Extra attention is needed

Comments

@honghuzi
Copy link
Contributor

It would be great if lsp-bridge has julialang support.

@manateelazycat
Copy link
Owner

Add new LSP server into lsp-bridge is pretty easy, please read https://github.com/manateelazycat/lsp-bridge#add-support-for-new-language

You just need steal json setting from VSCode, then send a PR. ;)

@honghuzi
Copy link
Contributor Author

I didn't find the exact file to steal configs from.
I read the existing lsp-bridge/langserver/typescript.json

{
  "name": "typescript",
  "languageId": "TypeScript",
  "command": [
    "typescript-language-server",
    "--stdio"
  ],
  "settings": {}
}

and found little configurations. Maybe "command" is the most useful?
Then i searched all "typescript json" files with the Everything tool as below

~\.vscode\extensions\ms-ceintl.vscode-language-pack-zh-hans-1.71.9140930\translations\extensions\typescript-basics.i18n.json
~\.vscode\extensions\ms-ceintl.vscode-language-pack-zh-hans-1.71.9140930\translations\extensions\typescript-language-features.i18n.json
~\Microsoft VS Code\resources\app\extensions\typescript-basics\syntaxes\TypeScript.tmLanguage.json
~\Microsoft VS Code\resources\app\extensions\typescript-basics\syntaxes\TypeScriptReact.tmLanguage.json
~\AppData\Roaming\Code\clp\52a557de5c39607b04949a9e2e3aeee5.zh-cn\vscode.typescript-language-features-91eb803b50b518fa1865b9b177116d70.json

, and still didn't find anything like the configs in lsp-bridge/langserver/typescript.json

@manateelazycat manateelazycat added the help wanted Extra attention is needed label Dec 1, 2022
@honghuzi
Copy link
Contributor Author

honghuzi commented Dec 7, 2022

According to the README of LanguageServer.jl, I added a julia.json file on the lanserver folder

{
  "name": "julials",
  "languageId": "julia",
  "command": [
    "julia.exe",
    "--project=C:\\Users\\myname\\.julia\\packages\\LanguageServer\\0vsx2\\src\\LanguageServer.jl\\environment",
    "-e",
    "using LanguageServer; runserver()"
  ],
  "settings": {},
  "support-single-file": false
}

and also added something to the lsp-bridge.el file,

However, the julia language server could not be started, the lsp-bridge buffer shows log.txt

@manateelazycat
Copy link
Owner

Looks like julia language server send workspace/configuration to lsp-bridge, and lsp-bridge not response futher message to julia language server.

You can research julia's docs, and add some handler at

self.handle_workspace_configuration_request(message["method"], message["id"], message["params"])
or
def handle_workspace_configuration_request(self, name, request_id, params):

@nesteiner
Copy link

@honghuzi hey, some problem occurs, the julials not working
image

by the way, did you know your json is not correct in julials.json with .exe
and with the update of Julia, the path to LanguageServer is changed
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants