It's some kind of state error with the vueDocuments stored in the language server. The second time round the document identifies the wrong range for the <template> block and the vue document formatter creates an edit that deletes characters in </template>. I gave up debugging at that point because it's super complex.
It's happening to me too, deleting text somewhere else in the file (not only in the template) on 'format on paste' (which uses format selection under the hood I believe). It doesn't seem to matter where or what I paste. I don't have a reproduction available at the moment, but it happens across all my Vue projects.
Not using a volar.config.js, but I do have an eslint config that does formatting for me. However, I always had that and haven't changed anything about it. Extremely dangerous problem for a code base.
Given the following document saved in a
Select all, then 'Format Selection' twice in a row. The second time, the formatting screws up and the
</template>tag is partially deleted.
The text was updated successfully, but these errors were encountered: