uiua-lang / uiua-vscode

Uiua language client extension for VSCode
MIT License
21 stars 6 forks source link

getting the formatted source back into the vscode editing buffer #9

Open vigilancetech-com opened 10 months ago

vigilancetech-com commented 10 months ago

okay, with vscode factory reset, I go in and start the uiua extension, open my .ua file and vscode's terminal, start uiua there, make some changes to my .ua file, they save, the uiua interpreter shows the stack effects, then when I go to make more changes, vscode tells me there's a file conflict (apparently since uiua has overwritten the original file textual commands with glyphs). I go into the settings on the "Files: Save Conflicts Resolution" and there doesn't seem to be an option for vscode to just use the modified file without prompting me. Is there an extension or setting which would allow vscode to revert that file so the glyphs come back in automatically?

Also, is this the proper procedure? Am I supposed to open vscode's terminal and start uiua in the directory containing the *.ua file or is this extension supposed to do that automatically (and give me the stack traces somewhere else)?

It seems like I've seen the formatted code sometimes show back up in the source buffer but it doesn't seem consistent and I don't know what I'm doing that does it. It seems like maybe it shows up after a fairly long delay.

Maybe the former issue is popping up because I'm trying to type in the buffer at the same time uiua is re-writing the *.ua file and that's where the conflict arises?

kaikalii commented 10 months ago

The intended use is to have the uiua process running in the vscode terminal with format-on-save enabled. Saving the buffer should show outputs in the terminal.