From 0d6acaed5084fb47aca089ecdd3ee8a15cb0666b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Tue, 24 Oct 2023 14:57:27 +0200 Subject: [PATCH] feat(docs): improve markdown snippets --- .vscode/markdown.code-snippets | 68 +++++++++++++++++++++++++--------- 1 file changed, 51 insertions(+), 17 deletions(-) diff --git a/.vscode/markdown.code-snippets b/.vscode/markdown.code-snippets index ec9bebbd4..f64c66cae 100644 --- a/.vscode/markdown.code-snippets +++ b/.vscode/markdown.code-snippets @@ -1,9 +1,10 @@ { "Callout": { - "prefix": "callout", + "prefix": "@callout", "description": "Add a callout to highlight information", "body": [ "", + "", "### ${2:Optional title}", "", "${0:${TM_SELECTED_TEXT}}", @@ -11,26 +12,30 @@ ] }, "SDK function": { - "prefix": "sdk function", + "prefix": "@function", "description": "Document an SDK function for reference material", "body": [ - "", + "", + "", + "## ${1:Method name}", + "", + "${2:Add a description of the method or function here}", "", - "${4:Add a description of the method or function here}", + "", + "", + "${3:Add the method signature from the SDK repository here}", + "", + "" "", "", "", - "${5:Add the example code snippet here}", + "${4:Add the example code snippet here}", "", "", "", "", "", - "${6:Optional slot for method parameters}", + "${5:Optional slot for method parameters}", "", "", "", @@ -43,20 +48,44 @@ "" ] }, + "Fragment": { + "prefix": "@fragment", + "description": "Insert reusable text from another location", + "body": [ + "import ${1:Fragment name} from \"${2:Fragment location}\"", + "", + "<${1} />" + ] + }, "Accordion": { - "prefix": "insert accordion", + "prefix": "@accordion", "description": "Insert an accordion (dropdown)", "body": [ "", + "", "### ${1:Accordion title}", "#### ${2:Optional badge text}", "", "${0:${TM_SELECTED_TEXT}}", + "", "" ] }, + "Table": { + "prefix": "@table", + "description": "Insert a markdown table", + "body": [ + "", + "", + "| ${2: Column header 1} | ${3: Column header 2}", + "| --- | --- |" + "| ${4: Column body 1} | ${0: Column body 2}", + "", + "
" + ] + }, "List table": { - "prefix": "list table", + "prefix": "@listtable", "description": "Insert a table defined as a set of lists", "body": [ "", @@ -70,30 +99,34 @@ ] }, "Guilabel": { - "prefix": "guilabel", + "prefix": "@guilabel", "description": "Format text as a GUI label (e.g. a button label or interface label", "body": [ "${0:${TM_SELECTED_TEXT}}" ] }, "MenuSelection": { - "prefix": "menuselection", + "prefix": "@menuselection", "description": "Format text as a series of menu selections", "body": [ "${0:${TM_SELECTED_TEXT}}" ] }, "Tile": { - "prefix": "tile", + "prefix": "@tile", "description": "Insert a tile", "body": [ - "", + "", + "", + "### ${3:An optional title" + "", "${0:${TM_SELECTED_TEXT}}", + "", "" ] }, "Tabs": { - "prefix": "tabs", + "prefix": "@tabs", "description": "Insert a tab group", "body": [ "", @@ -108,6 +141,7 @@ "### ${11:Tab label}", "", "${0:Content}", + "", "", "" ]