vuejs / language-tools

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

Incorrect code highlight in vue after :model-value #4449

Closed vedmant closed 2 weeks ago

vedmant commented 2 weeks ago

Type: Bug

I have a Vue file and code highlighting breaks after lines like:

:model-value="findEntry(row.uuid) ? (findEntry(row.uuid).until ? 'temporary' : 'unavailable') : 'available'"

or

:model-value="findEntry(row.uuid).until"

or

:options="schedules.reduce((acc, sch) => (acc[sch.uuid] = sch.name, acc), {})"

Monosnap OutletAvailabilityPanel vue — merchant-console-nuxt 2024-06-03 12-14-20

If I remove that lines, highlighting works ok.

VS Code version: Code 1.89.1 (dc96b837cf6bb4af9cd736aa3af08cf8279f7685, 2024-05-07T05:14:32.757Z) OS version: Darwin arm64 23.2.0 Modes:

System Info |Item|Value| |---|---| |CPUs|Apple M1 Pro (10 x 24)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|5, 3, 3| |Memory (System)|16.00GB (0.05GB free)| |Process Argv|--crash-reporter-id afe0448e-e8ec-4938-bd8a-1f43d6cd4e3d| |Screen Reader|no| |VM|0%|
Extensions (27) Extension|Author (truncated)|Version ---|---|--- vscode-mjml|att|1.6.0 npm-intellisense|chr|1.4.5 path-intellisense|chr|2.9.0 nuxt-vscode|cpr|0.0.6 vscode-eslint|dba|2.4.4 vscode-html-css|ecm|2.0.9 prettier-vscode|esb|10.4.0 auto-close-tag|for|0.5.15 auto-rename-tag|for|0.1.10 activitusbar|Gru|0.0.47 hungry-delete|jas|1.7.0 auto-comment-blocks|kev|1.0.1 identical-sublime-monokai-csharp-theme-colorizer|max|1.2.3 dotenv|mik|1.0.1 theme-monokai-pro-vscode|mon|1.3.2 vscode-scss|mrm|0.10.0 jupyter|ms-|2024.4.0 jupyter-keymap|ms-|1.1.2 jupyter-renderers|ms-|1.0.17 vscode-jupyter-cell-tags|ms-|0.1.9 vscode-jupyter-slideshow|ms-|0.1.6 vscode-react-native|msj|1.13.0 vetur|oct|0.37.3 paste-and-indent|par|0.1.0 volar|Vue|2.0.19 vetur-extended|zar|0.0.29 html-css-class-completion|Zig|1.20.0 (1 theme extensions excluded)
A/B Experiments ``` vsliv368cf:30146710 vspor879:30202332 vspor708:30202333 vspor363:30204092 vstes516:30244333 vscoreces:30445986 vscod805cf:30301675 binariesv615:30325510 vsaa593cf:30376535 py29gd2263:31024239 c4g48928:30535728 azure-dev_surveyone:30548225 962ge761:30959799 pythongtdpath:30769146 welcomedialog:30910333 pythonidxpt:30866567 pythonnoceb:30805159 asynctok:30898717 pythontestfixt:30902429 pythonregdiag2:30936856 pythonmypyd1:30879173 pythoncet0:30885854 2e7ec940:31000449 pythontbext0:30879054 accentitlementst:30995554 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 dsvsc020:30976470 pythonait:31006305 666c4381:31064718 chatpanelt:31048053 dsvsc021:30996838 9c06g630:31013171 pythoncenvpt:31062603 a69g1124:31058053 dvdeprecationcf:31061161 pythonprt:31056678 dwnewjupyter:31046869 26j00206:31048877 ```
davidmatter commented 2 weeks ago

Have you tried to uninstall vetur and vetur-extended?

vedmant commented 2 weeks ago

@davidmatter Yeah, looks like it's caused by vetur, thanks!