diff --git a/bin/tools/vscode-settings b/bin/tools/vscode-settings index 6cf4804cd6f5dccb12d9ee2309ee0388eee88244..80a9f3089806b220193b56d0f45c535b80e535c3 100755 --- a/bin/tools/vscode-settings +++ b/bin/tools/vscode-settings @@ -18,8 +18,7 @@ # Emit some settings for Visual Studio Code + OpenFOAM # # Example -# bin/tools/vscode-settings > .vscode/settings.json -# openfoam -spdp -int64 bin/tools/vscode-settings +# bin/tools/vscode-settings > openfoam.code-workspace # # Environment # WM_PROJECT_DIR, WM_PROJECT_USER_DIR, WM_OPTIONS @@ -42,8 +41,7 @@ options: Emit some settings for Visual Studio Code + OpenFOAM For example, - bin/tools/vscode-settings > .vscode/settings.json - openfoam -spdp -int64 bin/tools/vscode-settings + bin/tools/vscode-settings > openfoam.code-workspace USAGE exit 0 # clean exit @@ -117,15 +115,18 @@ cat << INFO 1>&2 # ------------------------- INFO -echo '{' # BEGIN_LIST - # ccls integration cat << JSON_CONTENT - "ccls.cache.directory": -"$outputDir/ccls-cache", +{ + "folders": [ + { + "path": "$projectDir" + } + ], + "settings": { + "ccls.cache.directory": "$outputDir/ccls-cache", - "ccls.misc.compilationDatabaseDirectory": -"$outputDir", + "ccls.misc.compilationDatabaseDirectory": "$outputDir", JSON_CONTENT @@ -134,19 +135,18 @@ JSON_CONTENT if [ -x "$session" ] then cat << JSON_CONTENT - "C_Cpp.default.compileCommands": -"$session wmake -with-bear -s -j", + "C_Cpp.default.compileCommands": "$session wmake -with-bear -s -j", JSON_CONTENT fi cat << JSON_CONTENT - "C_Cpp.autocomplete": "Disabled", - "C_Cpp.errorSquiggles": "Disabled", - "C_Cpp.formatting": "Disabled", - "C_Cpp.intelliSenseEngine": "Disabled" + "C_Cpp.autocomplete": "Disabled", + "C_Cpp.errorSquiggles": "Disabled", + "C_Cpp.formatting": "Disabled", + "C_Cpp.intelliSenseEngine": "Disabled" + } +} JSON_CONTENT -echo '}' # END_LIST - #------------------------------------------------------------------------------