cmake-language-support icon indicating copy to clipboard operation
cmake-language-support copied to clipboard

How to format only modified parts when saving

Open ITsYYT opened this issue 1 year ago • 0 comments

I set "editor.formatOnSaveMode": "modificationsIfAvailable" in vscode so that automatic formatting will only format the parts I modified when saving. This setting works well when I edit Cpp files, but this is not suitable for cmake-language-support, it does not seem to work. When saving the CMakeLists.txt file, it will directly format all the contents in the file, including parts of the file that were not written by me.

formatOnSaveSettings

Please tell me how to make cmake-language-support also support formatting only the modified part when saving, or directly disable formatting. I did not find the relevant option in the settings.

cmakeLanguageSupportSettings

ITsYYT avatar Mar 19 '24 03:03 ITsYYT