Skip to content
This repository was archived by the owner on Mar 21, 2024. It is now read-only.

Commit aec1eac

Browse files
author
Rusty Key
committed
remove ols-related code
1 parent 1072823 commit aec1eac

File tree

9 files changed

+4
-231
lines changed

9 files changed

+4
-231
lines changed

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"editor.formatOnSave": true,
2+
// "editor.formatOnSave": true,
33
"editor.detectIndentation": false,
44
"editor.insertSpaces": true,
55
"editor.tabSize": 2,

package.json

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -22,24 +22,6 @@
2222
"activationEvents": ["onLanguage:ocaml", "onLanguage:reason"],
2323
"main": "./out/src/extension",
2424
"contributes": {
25-
"commands": [
26-
{
27-
"command": "reason.caseSplit",
28-
"title": "Reason: Case Split"
29-
},
30-
{
31-
"command": "reason.showMerlinFiles",
32-
"title": "Reason: Show Merlin Files"
33-
},
34-
{
35-
"command": "reason.showAvailableLibraries",
36-
"title": "Reason: Show Libraries Available via Dependencies"
37-
},
38-
{
39-
"command": "reason.showProjectEnv",
40-
"title": "Reason: Show Environment"
41-
}
42-
],
4325
"configuration": {
4426
"type": "object",
4527
"title": "Reason configuration",
@@ -268,15 +250,6 @@
268250
"id": "reason.hover.type"
269251
}
270252
],
271-
"menus": {
272-
"editor/context": [
273-
{
274-
"command": "reason.caseSplit",
275-
"group": "reason",
276-
"when": "editorTextFocus && resourceLangId == reason"
277-
}
278-
]
279-
},
280253
"snippets": [
281254
{
282255
"language": "reason",
@@ -327,7 +300,6 @@
327300
},
328301
"dependencies": {
329302
"lodash.flatmap": "^4.5.0",
330-
"ocaml-language-server": "1.0.35",
331303
"pegjs": "0.10.0",
332304
"vscode-jsonrpc": "3.6.0",
333305
"vscode-languageclient": "4.0.1",

src/client/command/doShowAvailableLibraries.ts

Lines changed: 0 additions & 17 deletions
This file was deleted.

src/client/command/doShowMerlinFiles.ts

Lines changed: 0 additions & 19 deletions
This file was deleted.

src/client/command/doShowProjectEnv.ts

Lines changed: 0 additions & 25 deletions
This file was deleted.

src/client/command/doSplitCases.ts

Lines changed: 0 additions & 75 deletions
This file was deleted.

src/client/command/index.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
11
import * as vscode from "vscode";
22
import * as client from "vscode-languageclient";
3-
import * as doShowAvailableLibraries from "./doShowAvailableLibraries";
4-
import * as doShowMerlinFiles from "./doShowMerlinFiles";
5-
import * as doShowProjectEnv from "./doShowProjectEnv";
6-
import * as doSplitCases from "./doSplitCases";
73
import * as fixEqualsShouldBeArrow from "./fixEqualsShouldBeArrow";
84
import * as fixMissingSemicolon from "./fixMissingSemicolon";
95
import * as fixUnusedVariable from "./fixUnusedVariable";
106

117
export function registerAll(context: vscode.ExtensionContext, languageClient: client.LanguageClient): void {
12-
doShowMerlinFiles.register(context, languageClient);
13-
doShowProjectEnv.register(context, languageClient);
14-
doShowAvailableLibraries.register(context, languageClient);
15-
doSplitCases.register(context, languageClient);
168
fixEqualsShouldBeArrow.register(context, languageClient);
179
fixMissingSemicolon.register(context, languageClient);
1810
fixUnusedVariable.register(context, languageClient);

src/client/index.ts

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -158,53 +158,3 @@ export async function launchMerlinLsp(context: vscode.ExtensionContext, useEsy:
158158
window.merlin.text = "$(hubot) [merlin]";
159159
window.merlin.tooltip = "merlin server online";
160160
}
161-
162-
export async function launchOCamlLanguageServer(context: vscode.ExtensionContext): Promise<void> {
163-
const reasonConfig = vscode.workspace.getConfiguration("reason");
164-
const module = context.asAbsolutePath(path.join("node_modules", "ocaml-language-server", "bin", "server"));
165-
const options = { execArgv: ["--nolazy", "--inspect=6009"] };
166-
const transport = client.TransportKind.ipc;
167-
const run = { module, transport };
168-
const debug = {
169-
module,
170-
options,
171-
transport,
172-
};
173-
const serverOptions = { run, debug };
174-
const languages = reasonConfig.get<string[]>("server.languages", ["ocaml", "reason"]);
175-
const documentSelector = flatMap(languages, (language: string) => [
176-
{ language, scheme: "file" },
177-
{ language, scheme: "untitled" },
178-
]);
179-
180-
const clientOptions: client.LanguageClientOptions = {
181-
diagnosticCollectionName: "ocaml-language-server",
182-
documentSelector,
183-
errorHandler: new ErrorHandler(),
184-
initializationOptions: reasonConfig,
185-
outputChannelName: "OCaml Language Server",
186-
stdioEncoding: "utf8",
187-
synchronize: {
188-
configurationSection: "reason",
189-
fileEvents: [
190-
vscode.workspace.createFileSystemWatcher("**/.merlin"),
191-
vscode.workspace.createFileSystemWatcher("**/*.ml"),
192-
vscode.workspace.createFileSystemWatcher("**/*.re"),
193-
vscode.workspace.createFileSystemWatcher("**/command-exec"),
194-
vscode.workspace.createFileSystemWatcher("**/command-exec.bat"),
195-
vscode.workspace.createFileSystemWatcher("**/_build"),
196-
vscode.workspace.createFileSystemWatcher("**/_build/*"),
197-
],
198-
},
199-
};
200-
const languageClient = new client.LanguageClient("Reason", serverOptions, clientOptions);
201-
const window = new ClientWindow();
202-
const session = languageClient.start();
203-
context.subscriptions.push(window);
204-
context.subscriptions.push(session);
205-
await languageClient.onReady();
206-
command.registerAll(context, languageClient);
207-
request.registerAll(context, languageClient);
208-
window.merlin.text = "$(hubot) [merlin]";
209-
window.merlin.tooltip = "merlin server online";
210-
}

vscode-reasonml.code-workspace

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
{
2-
"folders": [
3-
{
4-
"path": "../ocaml-language-server"
5-
},
6-
{
7-
"path": "."
8-
}
9-
],
2+
"folders": [{
3+
"path": "."
4+
}],
105
"settings": {
116
"typescript.tsdk": "./node_modules/typescript/lib"
127
}

0 commit comments

Comments
 (0)