mirror of
https://github.com/massbug/judge4c.git
synced 2025-05-18 07:16:34 +00:00
fix(language-server): make language server configuration environment variable driven
This commit is contained in:
parent
71f582514e
commit
b33edb933f
@ -13,17 +13,17 @@ export const SUPPORTED_LANGUAGE_SERVERS: LanguageServerConfig[] = [
|
|||||||
{
|
{
|
||||||
id: "c",
|
id: "c",
|
||||||
label: "C",
|
label: "C",
|
||||||
protocol: "http",
|
protocol: process.env.LSP_C_PROTOCOL || "http",
|
||||||
hostname: "localhost",
|
hostname: process.env.LSP_C_HOSTNAME || "localhost",
|
||||||
port: 4594,
|
port: process.env.LSP_C_PORT ? parseInt(process.env.LSP_C_PORT, 10) : 4594,
|
||||||
path: "/clangd"
|
path: process.env.LSP_C_PATH || "/clangd"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "cpp",
|
id: "cpp",
|
||||||
label: "C++",
|
label: "C++",
|
||||||
protocol: "http",
|
protocol: process.env.LSP_CPP_PROTOCOL || "http",
|
||||||
hostname: "localhost",
|
hostname: process.env.LSP_CPP_HOSTNAME || "localhost",
|
||||||
port: 4595,
|
port: process.env.LSP_CPP_PORT ? parseInt(process.env.LSP_CPP_PORT, 10) : 4595,
|
||||||
path: "/clangd"
|
path: process.env.LSP_CPP_PATH || "/clangd"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user