vuejs / language-tools

⚡ High-performance Vue language tooling based-on Volar.js
https://marketplace.visualstudio.com/items?itemName=Vue.volar
MIT License
5.79k stars 390 forks source link

IntelliSense does not work in template section of SFC when using "${configDir}" #4499

Open vikingair opened 3 months ago

vikingair commented 3 months ago

Vue - Official extension or vue-tsc version

2.0.22 (extension)

VSCode version

1.90.2

Vue version

3.4.27

TypeScript version

5.5.2

System Info

System:
    OS: macOS 14.5
    CPU: (12) arm64 Apple M2 Pro
    Memory: 1.84 GB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.14.0 - ~/.local/state/fnm_multishells/77314_1719210261179/bin/node
    npm: 10.7.0 - ~/.local/state/fnm_multishells/77314_1719210261179/bin/npm
    pnpm: 9.4.0 - ~/.local/state/fnm_multishells/77314_1719210261179/bin/pnpm
    bun: 1.1.12 - ~/.bun/bin/bun
  Browsers:
    Chrome: 126.0.6478.114
    Safari: 17.5

Steps to reproduce

Make use of the newly added feature of TypeScript 5.5: https://devblogs.microsoft.com/typescript/announcing-typescript-5-5/#the-configdir-template-variable-for-configuration-files

It works perfectly fine executing with vue-tsc. It works perfectly fine in SFC in VSCode in the <script setup lang="ts"> section.

It just highlights no TS errors inside the <template> part.

If you need more information, let me know.

Link to minimal reproduction

No response

Any additional comments?

No response

davidmatter commented 3 months ago

Does it work if you select the workspace's TS version here?

image
OsidAbu-alrub commented 2 months ago

It only works if you turn off Hybrid Mode setting

This causes problems cause you "lose" the ability to import things from Vue files into TS files

See issue here https://github.com/vuejs/language-tools/issues/4016. It was also fixed by turning off Hybrid Mode setting, but it caused other problems that I mentioned in the issue