{ // Place your adda workspace snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and // description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope // is left empty or omitted, the snippet gets applied to all languages. The prefix is what is // used to trigger the snippet and the body will be expanded and inserted. Possible variables are: // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. // Placeholders with the same ids are connected. // Example: // "Print to console": { // "scope": "javascript,typescript", // "prefix": "log", // "body": [ // "console.log('$1');", // "$2" // ], // "description": "Log output to console" // } "File Starting Comment": { "scope": "c,cpp", "prefix": "newFile", "body": [ "/* ${1:short description, possibly several lines}", " *", " * Copyright (C) ADDA contributors", " * This file is part of ADDA.", " *", " * ADDA is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as", " * published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.", " *", " * ADDA is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty", " * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.", " *", " * You should have received a copy of the GNU General Public License along with ADDA. If not, see", " * .", " */", "#include \"const.h\" // keep this first", "// project headers", "#include ${2:\"...\"}", "// system headers", "#include ${3:\"...\"}", "", "// SEMI-GLOBAL VARIABLES", "", "${4: ...}", "", "// LOCAL VARIABLES", "", "${5: ...}", "", "// EXTERNAL FUNCTIONS", "", "${6: ...}", "", "//======================================================================================================================", ], "description": "Insert starting comment for ADDA new source files" }, "Function Definition": { "scope": "c,cpp", "prefix": "newFunc", "body": [ "${1:ReturnType} ${2:functionName} (${3:arguments})", "// ${4:functionDescription}", "{", "\t${5:description}", "\t$0", "}", "", "//======================================================================================================================", ], "description": "Insert a function definition with a delimiter and comment" }, "Preprocessor Directive": { "scope": "c,cpp", "prefix": "newPreprocessor", "body": [ "#ifdef ${1:CONDITION}", "# include \"${2:file}\"", "#endif" ], "description": "Insert indented preprocessor directive" } }