mirror of
https://github.com/nvim-treesitter/nvim-treesitter-context
synced 2024-09-16 22:24:04 +02:00
feat(vue): add context support
This commit is contained in:
parent
6a4b354233
commit
a5d16fd763
3 changed files with 88 additions and 1 deletions
|
@ -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
6
queries/vue/context.scm
Normal file
|
@ -0,0 +1,6 @@
|
|||
([
|
||||
(element)
|
||||
(template_element)
|
||||
(script_element)
|
||||
(style_element)
|
||||
] @context)
|
81
test/test.vue
Normal file
81
test/test.vue
Normal 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>
|
Loading…
Reference in a new issue