Skip to content

Add Apple Silicon support, update dependencies #63

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

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
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
11 changes: 5 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we keep node version to 12?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i can try and downgrade it but may i ask why?

"typescript": "^4.4.3",
"coc.nvim": "^0.0.80"
}
}
11 changes: 8 additions & 3 deletions src/client/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
ExtensionContext,
commands,
workspace,
window,
LanguageClient,
LanguageClientOptions
} from 'coc.nvim';
Expand All @@ -21,19 +22,21 @@ 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<string>('version').toLowerCase();
const omnisharpRepo: LanguageServerRepository = {
kind: "github",
repo: "omnisharp/omnisharp-roslyn",
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" },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this a universal package?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it runs on my M1 MacBook so i believe it is

}

export async function activate(context: ExtensionContext) {
Expand Down Expand Up @@ -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();
Expand All @@ -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')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so this "window dot" thing will show that little popup window?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i believe so yes, check out this commit

}
client_dispose = client.start()
context.subscriptions.push(client_dispose)
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"compilerOptions": {
"noUnusedLocals": false,
"noUnusedParameters": false,
"noImplicitAny": true,
"noImplicitAny": false,
"noImplicitReturns": true,
"target": "es6",
"module": "commonjs",
Expand Down