Skip to content

Commit

Permalink
Merge pull request #1141 from Yuki61803/master
Browse files Browse the repository at this point in the history
fix: repair volar windows version and python windows paths
  • Loading branch information
manateelazycat authored Jan 3, 2025
2 parents fb0e319 + 277c922 commit a8e5d67
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,9 +503,9 @@ def replace_template(arg, project_path=None):
# pyright use `--cancellationReceive` option enable "background analyze" to improve completion performance.
return arg.replace("%FILEHASH%", os.urandom(21).hex())
elif "%USERPROFILE%" in arg:
return arg.replace("%USERPROFILE%", windows_get_env_value("USERPROFILE"))
return arg.replace("%USERPROFILE%", repr(windows_get_env_value("USERPROFILE")).strip("'"))
elif "%TSDK_PATH%" in arg:
return arg.replace("%TSDK_PATH%", get_emacs_func_result("get-user-tsdk-path"))
return arg.replace("%TSDK_PATH%", repr(get_emacs_func_result("get-user-tsdk-path")).strip("'"))
else:
return arg

Expand Down
2 changes: 1 addition & 1 deletion langserver/volar_windows.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"settings": {},
"initializationOptions": {
"typescript": {
"tsdk": "%USERPROFILE%\\AppData\\Roaming\\npm\\node_modules\\typescript\\lib",
"tsdk": "%USERPROFILE%\\AppData\\Roaming\\npm\\node_modules\\typescript\\lib"
},
"vue": {
"hybridMode": false
Expand Down

0 comments on commit a8e5d67

Please sign in to comment.