feat(vue): add context support

This commit is contained in:
Tony Le 2024-02-19 20:08:33 -05:00 committed by GitHub
parent 6a4b354233
commit a5d16fd763
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 88 additions and 1 deletions

View file

@ -82,6 +82,7 @@ Note: if you need support for Neovim 0.6.x please use the tag `compat/0.6`.
- [x] `usd`
- [x] `verilog`
- [x] `vim`
- [x] `vue`
- [x] `xml`
- [x] `yaml`
- [x] `yang`
@ -188,7 +189,6 @@ Note: if you need support for Neovim 0.6.x please use the tag `compat/0.6`.
- [ ] `v`
- [ ] `vala`
- [ ] `vhs`
- [ ] `vue`
- [ ] `wgsl`
- [ ] `wgsl_bevy`
- [ ] `yuck`

6
queries/vue/context.scm Normal file
View file

@ -0,0 +1,6 @@
([
(element)
(template_element)
(script_element)
(style_element)
] @context)

81
test/test.vue Normal file
View file

@ -0,0 +1,81 @@
<template>
<main>
<ul v-for="(button, index) in buttonList">
<li :key="index">
{{ button.content }}
</li>
</ul>
</main>
</template>
<script setup>
export default {
data() {
return {
buttonList: [],
}
},
methods: {
handleClick(target = null) {
if (!target) {
} else {
}
},
},
}
</script>
<style lang="scss" scoped>
.header {
align-items: center;
background-color: #fff;
display: flex;
justify-content: center;
.title {
color: var(--color-blue);
font-size: 1.5rem;
font-weight: 200;
margin: 0;
padding: 1rem 0;
}
}
</style>