mirror of
https://github.com/Strum355/mcshader-lsp.git
synced 2025-08-30 21:37:25 +00:00
v0.9.1
This commit is contained in:
parent
3dfaed7371
commit
bbcfe009bb
6 changed files with 20 additions and 13 deletions
|
@ -82,8 +82,6 @@ export class Extension {
|
|||
const exists = await fs.stat(dest).then(() => true, () => false)
|
||||
if (!exists) await this.state.updateServerVersion(undefined)
|
||||
|
||||
this.state.updateServerVersion('borger')
|
||||
|
||||
const release = await getReleaseInfo(this.package.version)
|
||||
|
||||
const platform = platforms[`${process.arch} ${process.platform}`]
|
||||
|
@ -94,7 +92,7 @@ export class Extension {
|
|||
|
||||
if (release.tag_name === this.state.serverVersion) return
|
||||
|
||||
const artifact = release.assets.find(artifact => artifact.name === `mcshader-lsp-${platform}`)
|
||||
const artifact = release.assets.find(artifact => artifact.name === `mcshader-lsp-${platform}${(process.platform === 'win32' ? '.exe' : '')}`)
|
||||
|
||||
const userResponse = await vscode.window.showInformationMessage(
|
||||
this.state.serverVersion == undefined ?
|
||||
|
|
|
@ -11,8 +11,9 @@ export class LanguageClient extends lsp.LanguageClient {
|
|||
constructor(ext: Extension) {
|
||||
super('vscode-mc-shader', 'VSCode MC Shader', {
|
||||
command: process.env['MCSHADER_DEBUG'] ?
|
||||
ext.context.asAbsolutePath(path.join('server', 'target', 'debug', 'mcshader-lsp')) :
|
||||
path.join(ext.context.globalStoragePath, 'mcshader-lsp')
|
||||
ext.context.asAbsolutePath(path.join('server', 'target', 'debug', 'mcshader-lsp')) +
|
||||
(process.platform === 'win32' ? '.exe' : '') :
|
||||
path.join(ext.context.globalStoragePath, 'mcshader-lsp')
|
||||
}, {
|
||||
documentSelector: [{scheme: 'file', language: 'glsl'}],
|
||||
outputChannel: lspOutputChannel,
|
||||
|
|
|
@ -7,9 +7,10 @@ export class PersistentState {
|
|||
log.info('working with state', { serverVersion })
|
||||
}
|
||||
|
||||
get serverVersion(): string | undefined {
|
||||
public get serverVersion(): string | undefined {
|
||||
return this.state.get('serverVersion')
|
||||
}
|
||||
|
||||
async updateServerVersion(value: string | undefined) {
|
||||
await this.state.update('serverVersion', value)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue