Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to teal-language-server #72

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

53 changes: 53 additions & 0 deletions client/extension.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
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,
args: ["--verbose=true", "--log-mode=by_proj_path"]
};

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
Loading