vuejs / language-tools

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

Vue - Official The code suggestions are duplicated #5000

Closed LeonCome closed 1 week ago

LeonCome commented 1 week ago

Vue - Official extension or vue-tsc version

2.1.10

VSCode version

1.95.2

Vue version

3.5.12

TypeScript version

5.6.3

System Info

Windows 11,Chrome

package.json dependencies

{"dependencies": {
    "vue": "^3.5.12"
  },
  "devDependencies": {
    "@tsconfig/node20": "^20.1.4",
    "@types/node": "^20.17.6",
    "@vitejs/plugin-vue": "^5.1.4",
    "@vue/tsconfig": "^0.5.1",
    "npm-run-all2": "^7.0.1",
    "typescript": "~5.6.3",
    "vite": "^5.4.10",
    "vite-plugin-vue-setup-extend": "^0.4.0",
    "vue-tsc": "^2.1.10"
  }}

Steps to reproduce

Code sample:

export default {
    data() {
        return {
            name: "101"  // Missing a comma here, move the cursor to the error to see the error message
            age: 0
        }
    },
}

Here is the error message:

errorMsg

Duplicate error messages appear

What is expected?

Expect only one error message to remain

What is actually happening?

Here are all the extensions I have enabled: image

Link to minimal reproduction

No response

Any additional comments?

No response

LeonCome commented 1 week ago

The following information might be useful.

1.Start VSCode, and you will see duplicate suggestions.

2.Disable the vueVue - Official extension without starting it.

3.Restart VSCode.

4.Enable the vueVue - Official extension. // At this point, there will be only one suggestion.

5.Restart VSCode. // Now, the suggestions are duplicated again.

KazariEX commented 1 week ago

Have you turned off the hybrid mode?

LeonCome commented 1 week ago

Have you turned off the hybrid mode? yes,I know what's wrong. I've turned it on now. The problem has been solved. thank you.