vscode-uncrustify icon indicating copy to clipboard operation
vscode-uncrustify copied to clipboard

Uncrustify config file keeps resetting

Open GijsGoudzwaard opened this issue 6 years ago • 6 comments

Uncrustify config file keeps resetting after switching tabs and resaving the file. I basically have to change all the settings again everytime I want to change one setting

GijsGoudzwaard avatar Nov 22 '17 20:11 GijsGoudzwaard

I think this might be the same as #15; correct me if I'm wrong, but if you are changing a setting, and switching tabs before saving the changes, then yes, it will reset when you come back to it. Basically VSCode reloads the HTML page for the settings automatically, which means you will lose all unsaved changes upon switching tabs. I have found no simple way to get around that yet. If the file resets even after saving the changes however, there is a bug to be debugged...

LaurentTreguier avatar Nov 22 '17 21:11 LaurentTreguier

It resets after saving

GijsGoudzwaard avatar Nov 22 '17 22:11 GijsGoudzwaard

I can't reproduce this... What version of uncrustify are you using ? (I don't think this changes anything, but you never know sometimes...) Also, there is a debug option you can activate by adding uncrustify.debug: true to your VSCode configuration settings. It should log a bunch of things done by the extension in an output channel named "Uncrustify". Could you post the logs here after saving the uncrustify settings, switching to another file and coming back to the settings ?

LaurentTreguier avatar Nov 24 '17 18:11 LaurentTreguier

I have the same issue. Log error : Debug: command: save Debug: error saving config file: TypeError: Cannot read property 'uri' of undefined

colin-julien avatar Jan 16 '19 15:01 colin-julien

Do you have multiple workspaces set up, or a single workspace ?

LaurentTreguier avatar Jan 16 '19 15:01 LaurentTreguier

Same issue.

Editing the text version of the file is safer and should be the default given this bug imo.

kruncher avatar Jun 16 '19 18:06 kruncher