Created Dockerization option; created src folder; reated requirements.txt

Former-commit-id: 7f851f5bca
This commit is contained in:
2025-11-24 17:45:11 -06:00
parent 3091ed88bc
commit c2d85e711b
8 changed files with 98 additions and 0 deletions

View File

@@ -0,0 +1 @@
22bea36d0b01ddf2f56d5f5d84da8c155ce7d177

79
src/languageServers.js Normal file
View File

@@ -0,0 +1,79 @@
exports.servers = [
{
endpointName: "python",
args: ["pylsp"],
nameEndsWith: ".python",
connectionType: "stdio",
relativePath: false
}, {
endpointName: "gdscript",
args: [
"./Godot_v4.4-stable_linux.x86_64", ["--headless", "--lsp-port", "9999"]
],
nameEndsWith: ".gd",
connectionType: "stdio",
relativePath: false
}, {
endpointName: "go",
args: [
'gopls', ['-mode=stdio', '-remote=auto']
],
nameEndsWith: ".golang",
connectionType: "stdio",
relativePath: false,
serverFileNameReplacePattern: {
from: /.golang$/,
to: ".go"
},
clientFileNameReplacePattern: {
from: /.go$/,
to: ".golang"
},
}, {
endpointName: "c",
args: [
'clangd', ['--log=error']
],
nameEndsWith: ".c",
connectionType: "stdio"
}, {
endpointName: "cpp",
args: [
'clangd', ['--log=error']
],
nameEndsWith: ".cpp",
connectionType: "stdio"
}, {
endpointName: "java",
args: [
'javals', ["jdtls"]
],
nameEndsWith: ".java",
connectionType: "stdio"
}, {
endpointName: "java-other",
args: [
'javals', ["java-language-server"]
],
nameEndsWith: ".java",
connectionType: "stdio"
}, {
endpointName: "r",
args: [
'r', ['--slave', '-e', 'languageserver::run()']
],
nameEndsWith: ".r",
connectionType: "stdio",
relativePath: false
}, {
endpointName: "typescript",
args: [
'typescript-language-server', ['--stdio']
],
nameEndsWith: ".ts",
connectionType: "stdio",
relativePath: false
},
];

46
src/paths-utility.js Normal file
View File

@@ -0,0 +1,46 @@
const path = require("path");
const {URI} = require("vscode-uri");
function makeServerPath(fileName, replacement) {
if (fileName.startsWith("file:")) {
return fileName;
}
const serverPath = formatPath(__dirname + path.sep + "temp" + path.sep + fileName);
if (replacement) {
return serverPath.replace(
replacement.from,
replacement.to
);
}
return serverPath;
}
function makeClientPath(filePath, replacement) {
if (/^(file|https?):/.test(filePath)) {
return filePath;
}
const clientPath = filePath.split(/[/\\]/).pop();
if (replacement) {
return clientPath.replace(
replacement.from,
replacement.to
);
}
return clientPath;
}
function formatPath(filePath) {
return URI.file(filePath).toString();
}
exports.formatPath = formatPath;
exports.makeClientPath = makeClientPath;
exports.makeServerPath = makeServerPath;