mirror of
https://github.com/Strum355/mcshader-lsp.git
synced 2025-08-04 00:49:17 +00:00
Added download prompt to download glslangValdiator
This commit is contained in:
parent
db321c8566
commit
c5fc9ffedd
7 changed files with 342 additions and 32 deletions
|
@ -2,7 +2,7 @@ import * as vscode from 'vscode'
|
|||
import * as vscodeLang from 'vscode-languageclient'
|
||||
import * as path from 'path'
|
||||
|
||||
export function activate(context: vscode.ExtensionContext) {
|
||||
export async function activate(context: vscode.ExtensionContext) {
|
||||
const serverModule = context.asAbsolutePath(path.join('server', 'out', 'server.js'))
|
||||
|
||||
const debugOpts = { execArgv: ['--nolazy', '--inspect=6009']}
|
||||
|
@ -27,4 +27,10 @@ export function activate(context: vscode.ExtensionContext) {
|
|||
const langServer = new vscodeLang.LanguageClient('vscode-mc-shader', serverOpts, clientOpts)
|
||||
|
||||
context.subscriptions.push(langServer.start())
|
||||
|
||||
await langServer.onReady()
|
||||
|
||||
langServer.onNotification('update-config', (dir: string) => {
|
||||
vscode.workspace.getConfiguration().update('mcglsl.glslangValidatorPath', dir, vscode.ConfigurationTarget.Global)
|
||||
})
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue