Open honghuzi opened 2 years ago
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. ;)
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
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
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 https://github.com/manateelazycat/lsp-bridge/blob/5ff4f33a6145a9c38fecd1269c7850e249931d99/core/lspserver.py#L594 or https://github.com/manateelazycat/lsp-bridge/blob/5ff4f33a6145a9c38fecd1269c7850e249931d99/core/lspserver.py#L449
@honghuzi hey, some problem occurs, the julials not working
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
It would be great if lsp-bridge has julialang support.