HerringtonDarkholme / yats.vim

Yet Another TypeScript Syntax: The most advanced TypeScript Syntax Highlighting in Vim
Vim License
649 stars 68 forks source link

Detect embedded scripts in vue component #260

Closed mcpeng closed 2 years ago

mcpeng commented 2 years ago

Is yats.vim possible to detect embedded typescript in vue component?

<script lang="ts">
// ...
</script>

<script setup lang="ts">
// ...
</script>

I'm using coc-volar, yats.vim, vim-javascript now. coc-volar can detect that correctly, but if I use vim-javascript, it detects that as javascript and overwrites coc-volar's detection wrongly, I hope yats.vim can detect that correctly.

HerringtonDarkholme commented 2 years ago

It is supported in vim-vue. https://github.com/posva/vim-vue/blob/master/syntax/vue.vim#L48

image