feat: add Julia language server support (#14129)
Co-authored-by: Alexander Abramov <abramov231@gmail.com>
This commit is contained in:
committed by
GitHub
parent
fc1addb8f4
commit
38572b8175
@@ -44,6 +44,7 @@ export const LANGUAGE_EXTENSIONS: Record<string, string> = {
|
|||||||
".htm": "html",
|
".htm": "html",
|
||||||
".ini": "ini",
|
".ini": "ini",
|
||||||
".java": "java",
|
".java": "java",
|
||||||
|
".jl": "julia",
|
||||||
".js": "javascript",
|
".js": "javascript",
|
||||||
".kt": "kotlin",
|
".kt": "kotlin",
|
||||||
".kts": "kotlin",
|
".kts": "kotlin",
|
||||||
|
|||||||
@@ -2043,4 +2043,22 @@ export namespace LSPServer {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const JuliaLS: Info = {
|
||||||
|
id: "julials",
|
||||||
|
extensions: [".jl"],
|
||||||
|
root: NearestRoot(["Project.toml", "Manifest.toml", "*.jl"]),
|
||||||
|
async spawn(root) {
|
||||||
|
const julia = Bun.which("julia")
|
||||||
|
if (!julia) {
|
||||||
|
log.info("julia not found, please install julia first (https://julialang.org/downloads/)")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
process: spawn(julia, ["--startup-file=no", "--history-file=no", "-e", "using LanguageServer; runserver()"], {
|
||||||
|
cwd: root,
|
||||||
|
}),
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ OpenCode comes with several built-in LSP servers for popular languages:
|
|||||||
| gopls | .go | `go` command available |
|
| gopls | .go | `go` command available |
|
||||||
| hls | .hs, .lhs | `haskell-language-server-wrapper` command available |
|
| hls | .hs, .lhs | `haskell-language-server-wrapper` command available |
|
||||||
| jdtls | .java | `Java SDK (version 21+)` installed |
|
| jdtls | .java | `Java SDK (version 21+)` installed |
|
||||||
|
| julials | .jl | `julia` and `LanguageServer.jl` installed |
|
||||||
| kotlin-ls | .kt, .kts | Auto-installs for Kotlin projects |
|
| kotlin-ls | .kt, .kts | Auto-installs for Kotlin projects |
|
||||||
| lua-ls | .lua | Auto-installs for Lua projects |
|
| lua-ls | .lua | Auto-installs for Lua projects |
|
||||||
| nixd | .nix | `nixd` command available |
|
| nixd | .nix | `nixd` command available |
|
||||||
|
|||||||
Reference in New Issue
Block a user