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 403 forks source link

Duplicate intellisense suggestions inside <template> #4918

Open ludwig801 opened 1 month ago

ludwig801 commented 1 month ago

Vue - Official extension or vue-tsc version

2.1.6

VSCode version

1.9.42

Vue version

3.5.11

TypeScript version

5.6.2

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (20) x64 12th Gen Intel(R) Core(TM) i7-12700H
    Memory: 18.62 GB / 31.64 GB
  Binaries:
    Node: 20.18.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.22 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 10.9.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Chromium (127.0.2651.74)
    Mozilla Firefox: 131.0.2

package.json dependencies

{
  "dependencies": {
    "bootstrap": "^5.3.3",
    "buffer": "^6.0.3",
    "chart.js": "^4.4.4",
    "chartjs-chart-funnel": "^4.2.2",
    "chartjs-chart-geo": "^4.3.2",
    "chartjs-plugin-datalabels": "^2.2.0",
    "exceljs": "^4.4.0",
    "fast-xml-parser": "^4.3.6",
    "fflate": "^0.6.2",
    "floating-vue": "^5.2.2",
    "jquery": "^3.3.1",
    "lodash-es": "^4.17.21",
    "marked": "^9.1.0",
    "monaco-editor": "^0.51.0",
    "monaco-editor-webpack-plugin": "^7.1.0",
    "object-hash": "^3.0.0",
    "pinia": "^2.1.7",
    "three": "^0.124.0",
    "uuid": "^9.0.0",
    "vanilla-jsoneditor": "^0.21.4",
    "vue": "^3.5.11",
    "vue-advanced-chat": "^2.1.0",
    "vue-chartjs": "^5.3.1",
    "vue-i18n": "^10.0.3",
    "vue-router": "^4.4.5",
    "vue-slider-component": "^4.1.0-beta.7",
    "vuedraggable": "^4.1.0",
    "x-data-spreadsheet": "^1.1.9"
  },
  "devDependencies": {
    "@types/apidoc": "^0.50.0",
    "@types/bootstrap": "^5.2.10",
    "@types/glob": "^7.2.0",
    "@types/jquery": "^3.5.30",
    "@types/lodash-es": "^4.17.12",
    "@types/node": "^18.11.18",
    "@types/object-hash": "^3.0.2",
    "@types/uuid": "^9.0.1",
    "@vitejs/plugin-vue": "^5.1.4",
    "@vue/compiler-sfc": "^3.1.0",
    "glob": "^8.0.3",
    "grunt-apidoc": "^0.11.0",
    "less": "^4.2.0",
    "sass": "1.77.6",
    "typescript": "^5.6.2",
    "vite": "^5.4.2",
    "vite-plugin-monaco-editor": "^1.1.0",
    "vite-plugin-static-copy": "^1.0.6",
    "vue-component-type-helpers": "^2.1.6",
    "vue-tsc": "^2.1.6"
  }
}

Steps to reproduce

Create any simple vue component using <script setup>, like so:

<template>
  <div :class="id" :data-value="model"></div>
</template>

<script setup lang="ts">
defineProps<{
  id: string;
}>();

const model = defineModel("model");
</script>

In the <template> section, when binding a property (such as class or data-value) and writing the name of defined properties, models, or other variables (such as id or model, in the example), the suggestion box shows these variables twice, which may indicate that something is being processed twice...

image

image

What is expected?

The variable name should appear only once.

What is actually happening?

The variable name appears twice.

Link to minimal reproduction

No response

Any additional comments?

No response