Skip to content

Commit 3760db1

Browse files
committed
Add LSP client
1 parent a3ec50e commit 3760db1

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

src/client.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import {
2+
Executable,
3+
LanguageClient,
4+
LanguageClientOptions,
5+
ServerOptions,
6+
} from 'vscode-languageclient/node';
7+
8+
const serverOptions: ServerOptions = <Executable>{
9+
command: "M2-language-server"};
10+
11+
const clientOptions: LanguageClientOptions = {};
12+
13+
export default new LanguageClient(
14+
"macaulay2-language-server",
15+
serverOptions,
16+
clientOptions);

src/extension.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import * as vscode from 'vscode';
66
import * as completions from "./completionProviders";
77
import * as repl from "./repl";
8+
import client from "./client";
89

910
// this method is called when your extension is activated
1011
// your extension is activated the very first time the command is executed
@@ -16,6 +17,7 @@ export function activate(context: vscode.ExtensionContext) {
1617

1718
completions.activate(context);
1819
repl.activate(context);
20+
client.start();
1921

2022
}
2123

0 commit comments

Comments
 (0)