LaurentTreguier / vscode-uncrustify

Code format using uncrustify
66 stars 10 forks source link

Uncrustify config file keeps resetting #18

Open GijsGoudzwaard opened 6 years ago

GijsGoudzwaard commented 6 years ago

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

LaurentTreguier commented 6 years ago

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...

GijsGoudzwaard commented 6 years ago

It resets after saving

LaurentTreguier commented 6 years ago

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 ?

colin-julien commented 5 years ago

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

LaurentTreguier commented 5 years ago

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

kruncher commented 5 years ago

Same issue.

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