From 7c0a8ae89ea478545746fc6eef2f2dd8ccfa7bb9 Mon Sep 17 00:00:00 2001 From: Sporiff Date: Mon, 8 May 2023 20:12:41 +0200 Subject: [PATCH] feat(docs): add documentation snippets Part-of: --- .vscode/markdown.code-snippets | 108 +++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 .vscode/markdown.code-snippets diff --git a/.vscode/markdown.code-snippets b/.vscode/markdown.code-snippets new file mode 100644 index 000000000..3fe4b1dd2 --- /dev/null +++ b/.vscode/markdown.code-snippets @@ -0,0 +1,108 @@ +{ + "Callout": { + "prefix": "callout", + "description": "Add a callout to highlight information", + "body": [ + ":::{${1|attention,caution,danger,error,hint,important,note,seealso,tip,warning|}} ${2:Optional title}", + "${0:${TM_SELECTED_TEXT}}", + ":::" + ], + }, + "Code tabs": { + "prefix": "code-tabs", + "description": "Insert a set of code tabs", + "body": [ + ":::{tab-set-code}", + "", + "$0", + "", + ":::" + ] + }, + "Tab set": { + "prefix": "tab-set", + "description": "Insert a group of generic tabs", + "body": [ + "::::{tab-set}", + ":::{tab-item} ${1:Tab title}", + "$2", + ":::", + "", + ":::{tab-item} ${3:Tab title}", + "$0", + ":::", + "", + "::::" + ] + }, + "Insert fragment": { + "prefix": "insert fragment", + "description": "Insert reusable text from another file", + "body": [ + ":::{include} ${1:full path to file}", + ":start-after: ${2:the text to start after}", + ":end-before: ${0:the text to end before}", + ":::" + ] + }, + "Dropdown": { + "prefix": "insert dropdown", + "description": "Insert a dropdown (accordion)", + "body": [ + ":::{dropdown} ${1:title}", + "${0:${TM_SELECTED_TEXT}}", + ":::" + ] + }, + "Versioning": { + "prefix": "version change", + "description": "Specify when a feature was added, changed, or deprecated", + "body": [ + ":::{${1|versionadded,versionchanged,deprecated|}} ${2:v4.32.0}", + "${0:${TM_SELECTED_TEXT}}", + ":::" + ] + }, + "List table": { + "prefix": "list table", + "description": "Insert a table defined as a set of lists", + "body": [ + ":::{list-table} ${1:Optional title}", + ":header-rows: ${2:Number of header rows}", + "", + "* - ${3: First row column 1}", + " - ${4: First row column 2}", + "* - ${5: Second row column 1}", + " - ${0: Second row column 2}", + ":::" + ] + }, + "Guilabel": { + "prefix": "guilabel", + "description": "Format text as a GUI label (e.g. a button label or interface label", + "body": [ + "{guilabel}`${0:${TM_SELECTED_TEXT}}`" + ] + }, + "File": { + "prefix": "file", + "description": "Format text as a file name or path", + "body": [ + "{file}`${0:${TM_SELECTED_TEXT}}`" + ] + }, + "Increase indent": { + "prefix": "increase indent", + "description": "Increase the indentation of all selected colon or backtick fences", + "body": [ + "${TM_SELECTED_TEXT/((?[`:])\\k{2,})/$1$2/gm}" + ] + }, + "Deprecation warning": { + "prefix": "insert deprecation warning", + "description": "Inserts an inline deprecation badge. Useful in tables of parameters", + "body": [ + "{bdg-warning}`Deprecated`" + ] + } +}