Skip to content

Syntax highlighting breaks with dynamic object literal in v-bind #5313

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Mattyon opened this issue Apr 10, 2025 · 5 comments
Closed

Syntax highlighting breaks with dynamic object literal in v-bind #5313

Mattyon opened this issue Apr 10, 2025 · 5 comments
Labels

Comments

@Mattyon
Copy link

Mattyon commented Apr 10, 2025

Vue - Official extension or vue-tsc version

2.2.8

VSCode version

1.99.1

Vue version

3.5.0

TypeScript version

n/a

System Info

package.json dependencies

Steps to reproduce

Create a Vue component with the following snippet:

<template>
  <div v-bind="{ class: foo[bar] }">
    Text
  </div>
</template>

<script setup>
const foo = 'name'
const bar = { name: 'text-bold' }
</script>

What is expected?

Syntax highlighting remains correct

What is actually happening?

Syntax highlighting breaks after the v-bind (when the [bar] part is added)

Link to minimal reproduction

No response

Any additional comments?

Seems like downgrading Vue - official to version <2 fixes the issue.

@KazariEX
Copy link
Member

I cannot reproduce this. Can you disable all other extensions and check if the problem still persists?

@Mattyon
Copy link
Author

Mattyon commented Apr 10, 2025

Apparently this is reproducible with the combination of Vue - Official and WindiCSS IntelliSense plugins.

@KazariEX
Copy link
Member

KazariEX commented Apr 10, 2025

It seems that the problem is caused by this file: https://github.com/windicss/windicss-intellisense/blob/95aa33e/syntax/windi.attr.json

I think it would be better to open an issue at this repo.

@KazariEX
Copy link
Member

It seems that this repo is no longer under maintenance?

@Mattyon
Copy link
Author

Mattyon commented Apr 10, 2025

Thanks for helping me solve this issue. I guess the best way is to abandon WindiCSS as it's an ancient relic at this point anyways. Closing.

@Mattyon Mattyon closed this as completed Apr 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants