-
-
Notifications
You must be signed in to change notification settings - Fork 594
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
Language Server: Problem with incorrect paths in Windows #1316
Comments
Can you repro by modifying https://github.com/octref/veturpack? |
I still don't have a simple reproducible case, but I looked into this further I may have found the problem. vls usually uses vetur/server/src/modes/script/javascript.ts Line 249 in 16e6f80
getFsFilePath runs vscode-uri.parse().fsPath, which on Windows gives the following result with a file uri sent from Sublime LSP: As written above, this breaks typescript in my setup (Windows + Sublime Text + Sublime LSP) because previously, the tsserver has stored the sourceFiles like so: Now there's another function called getFilePath: vetur/server/src/utils/paths.ts Lines 47 to 54 in 16e6f80
which returns exactly what we (I) need: Any reason why I noticed that in another function, getFilePath is used to see if a file exists in the service: vetur/server/src/modes/script/javascript.ts Line 639 in 16e6f80
|
I got same. Current implementation does not handle Windows paths correctly. I'm using vim-lsp but vetur does not works eventhough another language server works fine on Windows. |
Info
Problem
I'm using the vls together with Language Server Protocol in Sublime Text 3.
However, the problem doesn't look like it depends on these programs.
What happens is that VLS in some cases passes the wrong path to typescript, which makes it fail when trying to find a source file. For example:
vetur/server/src/modes/script/javascript.ts
Lines 110 to 114 in 753c27b
This produces an uri like
c:\Users\path\src\components\App.vue
but Typescript internally has this file stored asC:/Users/path/src/components/App.vue
Reproducible Case
The text was updated successfully, but these errors were encountered: