Skip to content

Commit

Permalink
Switch to teal-language-server
Browse files Browse the repository at this point in the history
  • Loading branch information
pdesaulniers committed Sep 19, 2024
1 parent 8b53a87 commit c74b5e0
Show file tree
Hide file tree
Showing 18 changed files with 1,398 additions and 4,818 deletions.
7 changes: 0 additions & 7 deletions .vscode/extensions.json

This file was deleted.

20 changes: 1 addition & 19 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,7 @@
"name": "Launch Client",
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceRoot}"],
"outFiles": ["${workspaceRoot}/out/client/**/*.js"],
"preLaunchTask": {
"type": "npm",
"script": "watch"
}
},
{
"type": "node",
"request": "attach",
"name": "Attach to Server",
"port": 6009,
"restart": true,
"outFiles": ["${workspaceRoot}/out/server/**/*.js"]
}
],
"compounds": [
{
"name": "Client + Server",
"configurations": ["Launch Client", "Attach to Server"]
"outFiles": ["${workspaceRoot}/out/client/**/*.js"]
}
]
}
4 changes: 1 addition & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,5 @@
},
"search.exclude": {
"out": true // set this to false to include "out" folder in search results
},
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off"
}
}
35 changes: 0 additions & 35 deletions .vscode/tasks.json

This file was deleted.

52 changes: 52 additions & 0 deletions client/extension.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
const workspace = require("vscode").workspace;
const LanguageClient = require("vscode-languageclient/node").LanguageClient;

let client;

function activate(context) {
console.log("Starting teal-language-server...");

let serverExecutableName = "teal-language-server"

let executable = {
command: serverExecutableName
};

let serverOptions = {
run: executable,
debug: executable
};

let clientOptions = {
documentSelector: [
{ scheme: 'file', language: 'teal' },
{ scheme: 'file', language: 'lua', pattern: '**/tlconfig.lua' }
],
synchronize: {
fileEvents: workspace.createFileSystemWatcher('**/*.{tl,lua}')
},
outputChannelName: 'Teal Language Server'
};

client = new LanguageClient(
'TealLanguageServer',
'Teal Language Server',
serverOptions,
clientOptions
);

client.start();
}

function deactivate() {
if (!client) {
return undefined;
}

return client.stop();
}

module.exports = {
activate: activate,
deactivate: deactivate
};
70 changes: 0 additions & 70 deletions client/extension.ts

This file was deleted.

Loading

0 comments on commit c74b5e0

Please sign in to comment.