Closed kevinramharak closed 3 months ago
Thank you for the detailed issue!
I think the main reason it didn't work is that In the new official extension of Vue VSCode plugin, Hybrid mode is enabled by default, which means that a TypeScript LSP Plugin publishes the diagnostics as ts-plugin
instead of ts
.
I fixed it in #103, published in v0.5.4.
I also moved to fsPath
. It is better, and I wasn't aware of that. Thank you!
@yoavbls Looks like v0.5.4 still needs to be merged into main (or perhaps you just haven't pushed your changes to main)?
Describe the bug I noticed that I did not get any prettified errors when working from a
.vue
file.I setup a basic snippet like:
And per screenshot the highlighter result:![image](https://github.com/yoavbls/pretty-ts-errors/assets/14903712/e171204a-56c6-4412-bd43-eefa06fb0a54)
Expected behavior I expected to see a prettified error message as vue support is implemented.
Cause I cloned the repo and ran it with the debugger and found that this issue is caused by the following:
https://github.com/yoavbls/pretty-ts-errors/blob/b388ac534847a809d78c49211b023b2fb39c33f8/src/extension.ts#L72
On this line the value of
uri.path
is:'/c:/Users/kevin/Documents/Projects/phavuer-playground/src/App.vue'
When in the
hoverProvider.ts
: https://github.com/yoavbls/pretty-ts-errors/blob/b388ac534847a809d78c49211b023b2fb39c33f8/src/provider/hoverProvider.ts#L6-L10The value of
document.uri.path
is'/C:/Users/kevin/Documents/Projects/phavuer-playground/src/App.vue'
.Notice the casing difference of the
C
drive:This causes the
hoverProvider
to think there are no stored items to show, and thus show no results.Fix VS Code seems to use this implementation for the
Uri
class.Maybe use
fsPath
instead as it states: