summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.vscode/vs-code-template.code-workspace.in176
-rw-r--r--configure.ac3
2 files changed, 178 insertions, 1 deletions
diff --git a/.vscode/vs-code-template.code-workspace.in b/.vscode/vs-code-template.code-workspace.in
new file mode 100644
index 000000000000..46f25dcd4f66
--- /dev/null
+++ b/.vscode/vs-code-template.code-workspace.in
@@ -0,0 +1,176 @@
+// *** Autogenerated file - created by configure.ac ***
+// you should save the auto-generated vs-code-templates.code-workspace to a separate file
+// to prevent your changes from being overwritten
+{
+ "extensions": {
+ "recommendations": [
+ "ms-vscode.cpptools"
+ ]
+ },
+ "folders": [
+ {
+ "name": "srcdir",
+ "path": "@SRC_ROOT@"
+ },
+ {
+ "name": "builddir",
+ "path": "@BUILDDIR@"
+ }
+ ],
+ "settings": {
+ "search.exclude": {
+ "/compile_commands.json": true,
+ "/dictionaries/": true,
+ "/helpcontent2/": true,
+ "/icon-themes/": true,
+ "/translations/": true
+ },
+ "files.watcherExclude": {
+ "/dictionaries/": true,
+ "/helpcontent2/": true,
+ "/icon-themes/": true,
+ "/translations/": true
+ },
+ // FIXME: arguably the generator should place it in the builddir, not srcdir
+ "C_Cpp.default.compileCommands": "${workspaceFolder:srcdir}/compile_commands.json",
+ // only used if the file doesn't match anything in the compile_commands.json - aka externals
+ // libxml includes just added as example/for reference
+ "C_Cpp.default.includePath": [
+ "${workspaceFolder:builddir}/workdir/UnpackedTarball/**",
+ "/usr/include/libxml2/"
+ ],
+ // adjust if necessary
+ "C_Cpp.default.compilerPath": "@GCC_HOME@/bin/gcc",
+ "C_Cpp.default.intelliSenseMode": "gcc-x64",
+ "C_Cpp.default.browse.limitSymbolsToIncludedHeaders": true,
+ "C_Cpp.default.cppStandard": "c++17",
+ // point this to LibreOffice's version of clang-format 5.0.0,
+ // otherwise clang-format from the plugin is used, and that
+ // gives slightly different results
+ "C_Cpp.clang_format_path": "/opt/lo/bin/clang-format",
+ "editor.rulers": [
+ 100
+ ]
+ },
+ "tasks": {
+ "version": "2.0.0",
+ "tasks": [
+ {
+ "label": "full make",
+ "detail": "runs make in builddir to update everything",
+ "type": "shell",
+ "command": "make",
+ "group": {
+ "kind": "build",
+ "isDefault": true
+ },
+ "options": {
+ "cwd": "${workspaceFolder:builddir}"
+ }
+ },
+ {
+ "label": "create compile-commands.json",
+ "detail": "runs make vim-ide-integration to create the compile-commands.json file",
+ "type": "shell",
+ "command": "make",
+ "args": [
+ "vim-ide-integration"
+ ],
+ "group": "build",
+ // doesn't really depend on full make, but doesn't hurt
+ // updating the compile-commands is not needed all the time and also demonstrate
+ // how to use dependencies in tasks…
+ "dependsOn": [
+ "full make"
+ ],
+ "options": {
+ "cwd": "${workspaceFolder:builddir}"
+ },
+ "problemMatcher": [] // don't ask when manually running the task
+ },
+ {
+ "label": "remove profile-dir",
+ "detail": "removes the temporary user-profile profile directory",
+ "type": "shell",
+ "command": "rm",
+ "args": [
+ "-rf",
+ "vs-code-temporary-user-profile"
+ ],
+ "group": "none",
+ "dependsOn": [
+ "full make"
+ ],
+ "options": {
+ "cwd": "${workspaceFolder:builddir}"
+ },
+ "problemMatcher": []
+ }
+ ]
+ },
+ "launch": {
+ "configurations": [
+ {
+ "name": "run in gdb",
+ "type": "cppdbg",
+ "request": "launch",
+ "program": "${workspaceFolder:builddir}/instdir/program/soffice.bin",
+ "args": [],
+ "stopAtEntry": false,
+ "cwd": "${workspaceFolder:builddir}",
+ "environment": [
+ {
+ // added in disabled form for convenience/as an example
+ // (proper name is just SAL_LOG),
+ // see https://docs.libreoffice.org/sal/html/sal_log.html
+ "name": "SAL_LOG_DISABLED",
+ "value": "+INFO.ucb+WARN"
+ }
+ ],
+ "externalConsole": false,
+ "MIMode": "gdb",
+ "miDebuggerPath": "/usr/libexec/gdb",
+ "setupCommands": [
+ {
+ "description": "Enable prett-printing for gdb",
+ "text": "-enable-pretty-printing",
+ "ignoreFailures": true
+ }
+ ],
+ "preLaunchTask": "full make"
+ },
+ {
+ // FIXME: not happy here when creating the profile while running in debugger
+ // no problem passing the profile dir once it was launched outside debugger once,
+ // but clearing out the user-profile dir needs to be triggered manually
+ "name": "run in gdb with clear userprofile",
+ // "preLaunchTask": "remove profile-dir",
+ "type": "cppdbg",
+ "request": "launch",
+ "program": "${workspaceFolder:builddir}/instdir/program/soffice.bin",
+ "args": [
+ "-env:UserInstallation=file:///${workspaceFolder:builddir}/vs-code-temporary-user-profile"
+ ],
+ "stopAtEntry": false,
+ "cwd": "${workspaceFolder:builddir}",
+ "environment": [
+ {
+ "name": "SAL_LOG_DISABLED",
+ "value": "+INFO.ucb+WARN"
+ }
+ ],
+ "externalConsole": false,
+ "MIMode": "gdb",
+ "miDebuggerPath": "/usr/libexec/gdb",
+ "setupCommands": [
+ {
+ "description": "Enable pretty-printing for gdb",
+ "text": "-enable-pretty-printing",
+ "ignoreFailures": true
+ }
+ ]
+ }
+ ],
+ "compounds": []
+ }
+} \ No newline at end of file
diff --git a/configure.ac b/configure.ac
index 4d801817c36e..ad35a32c752e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -13988,7 +13988,8 @@ AC_CONFIG_FILES([config_host.mk
bin/officeotron.sh
hardened_runtime.xcent
instsetoo_native/util/openoffice.lst
- sysui/desktop/macosx/Info.plist])
+ sysui/desktop/macosx/Info.plist
+ vs-code-template.code-workspace:.vscode/vs-code-template.code-workspace.in])
AC_CONFIG_HEADERS([config_host/config_buildid.h])
AC_CONFIG_HEADERS([config_host/config_box2d.h])
AC_CONFIG_HEADERS([config_host/config_clang.h])