Paste code into zmodel doesn't work
Description and expected behavior When creating a new model, I tried copying an existing model or really anything within a .zmodel file and it will initially paste but them immediately get deleted. You can type into the file, but pasting anything will not work.
Screenshots If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
- VSCode 1.97.2
- ZenStack Language Tools 2.11.1
Hi @sw34 , this sounds very strange. Do you see any error in the VSCode extension output panel?
None. Attached is a screen recording, I am pasting a line repeatedly, you can see it flash on screen and get removed, then after about 10 or 12 attempts if finally pastes in.
https://github.com/user-attachments/assets/bbc11e48-ccaf-4be4-885d-f0b9adf4f032
Very strange ... does it happen to any model you work on? Or just one specific model. Do you have other vscode extension that can potentially interfere?
Any model does this.
My default formatter is set to None (null), and Prettier does not show as active when a zmodel file is loaded but as soon as I disable the Prettier extension and reload VSCode, pasting works fine. If I re-enable Prettier it goes back to as shown in the video.
["INFO" - 2:13:24 PM] Extension Name: esbenp.prettier-vscode.
["INFO" - 2:13:24 PM] Extension Version: 11.0.0.
I saw the update to the extension, and have added this to my settings file
"[zmodel]": {
"editor.defaultFormatter": "zenstack.zenstack"
},
I can now copy a whole model file, which I was not able to do before.
Copying a single property, it will work sometimes but not always. Only common thing I can see when it works is I am pasting at the same indent level as the other properties.