language-tools: Auto-import breaks constantly
Hello, I don’t really know how to formulate this issue as I don’t understand where it could be coming from and haven’t really found a pattern to it.
I’m developing an application using the Quasar Framework with Volar, and whether or not I use Takeover Mode, I am constantly irritated by the fact that whenever I call Intellisense with Ctrl+Space, more often than not, there will be no suggestions for me to use for auto-importing, whether it’s from an node_module (even from vue
) or some local file in my project. Typically, I have to use the Volar > Reload project
command for it to start working again, only for the same issue to reoccur in another file again anyways.
I haven’t done anything specific to my tsconfig.json
, following the exact same configuration settings as Quasar Framework recommends. I install my dependencies using yarn v1, so there isn’t any particular magic to how my modules are being installed to my project. I don’t have a volar.config.js
file, and even if I wanted to create one to test out things, I can’t figure out where the documentation for that file can be found. I looked as far as I could into every configuration setting possible, and I can’t see anything that looks to be out of the ordinary. I don’t think it’s any extension of mine, either.
As far as I can remember, I’ve only ever encountered this issue in Vue files. I have to assume this is because Volar likely works differently from the normal TypeScript server, since it doesn’t follow the same configuration settings, and creates its own separate server.
I have been hearing about an upcoming v2 of the language tools that would reuse the VSCode TypeScript server, do I have to wait for that to come out to hope for a more stable experience? Or is there some other way to fix this? Of course, I can provide any other details that could be of any help as needed.
About this issue
- Original URL
- State: open
- Created 8 months ago
- Reactions: 4
- Comments: 19 (1 by maintainers)
Using VSCode with this extension, when I open a
*.vue
file and I manually runVolar: Restart Vue server
, I can see all the types of all the global components that were auto-imported (I am using Nuxt 3 with@bg-dev/nuxt-naiveui
module), all components show up in green, mouse hover shows types info, etc. As soon as I change anything in that file, types are gone, components shows in blue instead of green, and types are nowany
.I also have this issue, extensively.
Volar: Restart Vue Server
orVolar: Reload Project
are things I have to trigger constantly.My naive observation: It gets progressively worse as our codebase grows. (We currently have 123 *.vue-files and 117 *.js-files in 196 directories our project.) We are not using Typescript, at all.
I’m not too motivated right now to try https://github.com/vuejs/language-tools/discussions/3789 out, but I’m eagerly awaiting the outcome of this.
Oh… Well this is stupid. I figured out after checking the diffs that I was using the pre-release versions of the extension all this time, for some reason. The default versions work just fine…