diff --git a/package.json b/package.json index 379a31b..4846c39 100644 --- a/package.json +++ b/package.json @@ -119,18 +119,17 @@ ] }, "scripts": { - "prepare": "npx npm-run-all compile", "compile": "tsc -p ./", "watch": "tsc -watch -p ./" }, "extensionDependencies": [], "dependencies": { - "@types/follow-redirects": "^1.8.0", - "coc-utils": "0.0.12" + "@types/follow-redirects": "^1.13.1", + "coc-utils": "0.0.16" }, "devDependencies": { - "@types/node": "^10.3.3", - "typescript": "^3.5.2", - "coc.nvim": "^0.0.73" + "@types/node": "^16.9.4", + "typescript": "^4.4.3", + "coc.nvim": "^0.0.80" } } diff --git a/src/client/extension.ts b/src/client/extension.ts index ea253a5..d5f77a0 100644 --- a/src/client/extension.ts +++ b/src/client/extension.ts @@ -11,6 +11,7 @@ import { ExtensionContext, commands, workspace, + window, LanguageClient, LanguageClientOptions } from 'coc.nvim'; @@ -21,8 +22,8 @@ import { sleep } from 'coc-utils' -const logger = workspace.createOutputChannel("coc-omnisharp") -const omnisharpLogger = workspace.createOutputChannel("omnisharp") +const logger = window.createOutputChannel("coc-omnisharp") +const omnisharpLogger = window.createOutputChannel("omnisharp") const omnisharpVersion = workspace.getConfiguration('omnisharp').get('version').toLowerCase(); const omnisharpRepo: LanguageServerRepository = { kind: "github", @@ -30,10 +31,12 @@ const omnisharpRepo: LanguageServerRepository = { channel: omnisharpVersion === "latest" ? omnisharpVersion : `tags/${omnisharpVersion}` } + const omnisharpPacks: ILanguageServerPackages = { "win-x64": { platformPath: "omnisharp-win-x64.zip", executable: "Omnisharp.exe" }, "linux-x64": { platformPath: "omnisharp-linux-x64.zip", executable: "run" }, "osx-x64": { platformPath: "omnisharp-osx.zip", executable: "run" }, + "osx-arm64": { platformPath: "omnisharp-osx.zip", executable: "run" }, } export async function activate(context: ExtensionContext) { @@ -87,12 +90,14 @@ export async function activate(context: ExtensionContext) { logger.appendLine("omnisharp debug mode activated") } + let serverOptions = { command: omnisharpExe, args: args, options: {cwd: workspace.rootPath} } + // Create the language client and start the client. let client = new LanguageClient('cs', 'OmniSharp Language Server', serverOptions, clientOptions); let client_dispose = client.start(); @@ -109,7 +114,7 @@ export async function activate(context: ExtensionContext) { } await omnisharpProvider.downloadLanguageServer() if (useCustomPath) { - workspace.showMessage(`coc-omnisharp: Using custom executable (${omnisharpCustomPath}) so the downloaded bundle will have no effect`, 'warning') + window.showMessage(`coc-omnisharp: Using custom executable (${omnisharpCustomPath}) so the downloaded bundle will have no effect`, 'warning') } client_dispose = client.start() context.subscriptions.push(client_dispose) diff --git a/tsconfig.json b/tsconfig.json index 58cf853..02c07fb 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "noUnusedLocals": false, "noUnusedParameters": false, - "noImplicitAny": true, + "noImplicitAny": false, "noImplicitReturns": true, "target": "es6", "module": "commonjs",