summaryrefslogtreecommitdiffstats
path: root/.vscode
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 05:54:39 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 05:54:39 +0000
commit267c6f2ac71f92999e969232431ba04678e7437e (patch)
tree358c9467650e1d0a1d7227a21dac2e3d08b622b2 /.vscode
parentInitial commit. (diff)
downloadlibreoffice-267c6f2ac71f92999e969232431ba04678e7437e.tar.xz
libreoffice-267c6f2ac71f92999e969232431ba04678e7437e.zip
Adding upstream version 4:24.2.0.upstream/4%24.2.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '.vscode')
-rw-r--r--.vscode/license.code-snippets21
-rw-r--r--.vscode/vs-code-template.code-workspace.in250
2 files changed, 271 insertions, 0 deletions
diff --git a/.vscode/license.code-snippets b/.vscode/license.code-snippets
new file mode 100644
index 0000000000..b29aa669d1
--- /dev/null
+++ b/.vscode/license.code-snippets
@@ -0,0 +1,21 @@
+{
+ // see TEMPLATE.SOURCECODE.HEADER
+ "MPL license header template": {
+ "prefix": ["license-header"], // last one to allow e.g. "lh" as trigger
+ "description": "Inserts the default MPL license header",
+ "scope": "cpp,c,java,javascript,objective-c,objective-cpp",
+ "isFileTemplate": true, // allow use from "Snippets: Populate File from Snippet command
+ "body": [
+ "/* -*- Mode: ${1|C++,C,Java,JS,ObjC|}; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */",
+ "/*",
+ " * This file is part of the LibreOffice project.",
+ " *",
+ " * This Source Code Form is subject to the terms of the Mozilla Public",
+ " * License, v. 2.0. If a copy of the MPL was not distributed with this",
+ " * file, You can obtain one at http://mozilla.org/MPL/2.0/.",
+ " */",
+ "","${0:$LINE_COMMENT your code goes here...}","",
+ "/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */"
+ ]
+ }
+} \ No newline at end of file
diff --git a/.vscode/vs-code-template.code-workspace.in b/.vscode/vs-code-template.code-workspace.in
new file mode 100644
index 0000000000..067f46faa9
--- /dev/null
+++ b/.vscode/vs-code-template.code-workspace.in
@@ -0,0 +1,250 @@
+// *** vs-code.code-workspace.template is an autogenerated file created by configure.ac ***
+// any changes to the vs-code.code-workspace.template file WILL BE OVERRIDDEN
+// use the vs-code.code-workspace file (make vscode-ide-integration) for your own edits
+{
+ "extensions": {
+ "recommendations": [
+ "ms-vscode.cpptools"
+ ]
+ },
+ "folders": [
+ {
+ "name": "srcdir",
+ "path": "@SRC_ROOT@"
+ },
+ {
+ // BUILDDIR may be configured separate from SRCDIR
+ "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
+ },
+ "files.associations": {
+ "*.patch.[0-9]": "diff"
+ },
+ "C_Cpp.default.compileCommands": "@BUILDDIR@/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": [
+ "@WORKDIR@/UnpackedTarball/**",
+ "/usr/include/libxml2/"
+ ],
+ "C_Cpp.default.browse.limitSymbolsToIncludedHeaders": true,
+ "C_Cpp.default.cppStandard": "c++20",
+ // 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
+ ],
+ // files in the repo should in general have a newline at end-of-file
+ "files.insertFinalNewline": true,
+ "editor.renderFinalNewline": "off",
+ "gitlens.autolinks": [
+ {
+ "prefix": "tdf#",
+ "url": "https://bugs.documentfoundation.org/show_bug.cgi?id=<num>"
+ }
+ ],
+ "terminal.integrated.profiles.windows": {
+ "Cygwin": {
+ "path": "@CYGWIN_BASH@",
+ "args": [
+ "--login"
+ ],
+ // prevent changing to $(HOME)
+ "env": {
+ "CHERE_INVOKING": "1"
+ }
+ }
+ },
+ "terminal.integrated.defaultProfile.windows": "Cygwin"
+ },
+ "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": "@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": "@BUILDDIR@"
+ },
+ "problemMatcher": [] // don't ask when manually running the task
+ },
+ {
+ "label": "remove profile-dir",
+ "detail": "removes the temporary user-profile directory",
+ "type": "shell",
+ "command": "rm",
+ "args": [
+ "-rf",
+ "@WORKDIR@/vs-code-temporary-user-profile"
+ ],
+ "group": "none",
+ "dependsOn": [
+ "full make"
+ ],
+ "options": {
+ "cwd": "@BUILDDIR@"
+ },
+ "problemMatcher": []
+ }
+ ]
+ },
+ "launch": {
+ "configurations": [
+ {
+ "name": "run in debugger after make",
+ "type": "cppdbg",
+ "request": "launch",
+ "program": "@INSTROOT@/program/soffice.bin",
+ "args": [],
+ "stopAtEntry": false,
+ "cwd": "@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,
+ "linux": {
+ "MIMode": "gdb",
+ "miDebuggerPath": "gdb",
+ "setupCommands": [
+ {
+ "description": "Enable pretty-printing for gdb",
+ "text": "-enable-pretty-printing",
+ "ignoreFailures": true
+ },
+ {
+ "description": "Mark pretty-printers (in solenv/gdb) safe",
+ "text": "add-auto-load-safe-path @SRC_ROOT@/solenv/gdb",
+ "ignoreFailures": true
+ },
+ {
+ "description": "Mark pretty-printers bootstrap (in instdir/program) safe",
+ "text": "add-auto-load-safe-path @INSTROOT@",
+ "ignoreFailures": true
+ },
+ ]
+ },
+ "osx": {
+ "program": "@INSTROOT@/MacOS/soffice",
+ "MIMode": "lldb",
+ "setupCommands": [
+ {
+ "description": "load helpers for lldb",
+ "text": "command script import ${workspaceFolder:srcdir}/solenv/lldb/libreoffice/LO.py",
+ "ignoreFailures": false
+ }
+ ]
+ },
+ "windows": {
+ "type": "cppvsdbg"
+ },
+ "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": "@INSTROOT@/program/soffice.bin",
+ "args": [
+ "-env:UserInstallation=file:///@WORKDIR@/vs-code-temporary-user-profile"
+ ],
+ "stopAtEntry": false,
+ "cwd": "@BUILDDIR@",
+ "environment": [
+ {
+ "name": "SAL_LOG_DISABLED",
+ "value": "+INFO.ucb+WARN"
+ }
+ ],
+ "externalConsole": false,
+ "linux": {
+ "MIMode": "gdb",
+ "miDebuggerPath": "gdb",
+ "setupCommands": [
+ {
+ "description": "Enable pretty-printing for gdb",
+ "text": "-enable-pretty-printing",
+ "ignoreFailures": true
+ },
+ {
+ "description": "Mark pretty-printers (in solenv/gdb) safe",
+ "text": "add-auto-load-safe-path @SRC_ROOT@/solenv/gdb",
+ "ignoreFailures": true
+ },
+ {
+ "description": "Mark pretty-printers bootstrap (in instdir/program) safe",
+ "text": "add-auto-load-safe-path @INSTROOT@",
+ "ignoreFailures": true
+ },
+ ]
+ },
+ "osx": {
+ "program": "@INSTROOT@/MacOS/soffice",
+ "MIMode": "lldb",
+ "setupCommands": [
+ {
+ "description": "load helpers for for lldb",
+ "text": "command script import ${workspaceFolder:srcdir}/solenv/lldb/libreoffice/LO.py",
+ "ignoreFailures": false
+ }
+ ]
+ },
+ "windows": {
+ "type": "cppvsdbg"
+ }
+ }
+ ],
+ "compounds": []
+ }
+}