-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[code] Enable web extension support.
For now this will not try to start the worker. Fixes #234
- Loading branch information
Showing
11 changed files
with
137 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { ExtensionContext } from "vscode"; | ||
import { LanguageClient } from "vscode-languageclient/browser"; | ||
import { activateCoqLSP, ClientFactoryType, deactivateCoqLSP } from "./client"; | ||
|
||
export function activate(context: ExtensionContext): void { | ||
const cf: ClientFactoryType = (context, clientOptions, wsConfig) => { | ||
// Pending on having the API to fetch the worker file. | ||
throw "Worker not found"; | ||
let worker = new Worker(""); | ||
return new LanguageClient( | ||
"coq-lsp", | ||
"Coq LSP Worker", | ||
clientOptions, | ||
worker | ||
); | ||
}; | ||
activateCoqLSP(context, cf); | ||
} | ||
|
||
export function deactivate() { | ||
deactivateCoqLSP(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { ExtensionContext } from "vscode"; | ||
import { LanguageClient, ServerOptions } from "vscode-languageclient/node"; | ||
import { activateCoqLSP, ClientFactoryType, deactivateCoqLSP } from "./client"; | ||
|
||
export function activate(context: ExtensionContext): void { | ||
const cf: ClientFactoryType = (context, clientOptions, wsConfig) => { | ||
const serverOptions: ServerOptions = { | ||
command: wsConfig.path, | ||
args: wsConfig.args, | ||
}; | ||
return new LanguageClient( | ||
"coq-lsp", | ||
"Coq LSP Server", | ||
serverOptions, | ||
clientOptions | ||
); | ||
}; | ||
return activateCoqLSP(context, cf); | ||
} | ||
|
||
export function deactivate() { | ||
return deactivateCoqLSP(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters