Skip to content

Commit fdbfb93

Browse files
committed
fix: update volar config path after update to newer version
1 parent 9db76d4 commit fdbfb93

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/vueVolarSupport.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import * as vscode from 'vscode'
22
import { watchExtensionSettings } from '@zardoy/vscode-utils/build/settings'
33
import { extensionCtx, getExtensionSetting } from 'vscode-framework'
4+
import { join } from 'path-browserify'
45

56
export default () => {
67
const handler = () => {
@@ -23,5 +24,9 @@ export default () => {
2324

2425
const isConfigValueChanged = (id: string) => {
2526
const config = vscode.workspace.getConfiguration('')
26-
return config.get(id) !== config.inspect(id)!.defaultValue
27+
const userValue = config.get<string>(id)
28+
if (userValue === config.inspect(id)!.defaultValue) return false
29+
// means that value was set by us programmatically, let's update it
30+
if (userValue?.startsWith(join(extensionCtx.extensionPath, '..'))) return false
31+
return true
2732
}

0 commit comments

Comments
 (0)