Skip to content

docs: create a markdown code snippet file to make it easier for contributors #15611

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ yarn-error.log
# Allow VSCode recommendations and default settings in project root.
!/.vscode/extensions.json
!/.vscode/settings.json
# Allow code snippets
!/.vscode/*.code-snippets

# Front-end ignore patterns.
.next/
Expand Down
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ yarn-error.log
# Allow VSCode recommendations and default settings in project root.
!/.vscode/extensions.json
!/.vscode/settings.json
# Allow code snippets
!/.vscode/*.code-snippets

# Front-end ignore patterns.
.next/
Expand Down
38 changes: 38 additions & 0 deletions .vscode/markdown.code-snippets
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
// For info about snippets, visit https://code.visualstudio.com/docs/editor/userdefinedsnippets

"admonition": {
"prefix": "#callout",
"body": [
"<blockquote class=\"admonition ${1|caution,important,note,tip,warning|}\">\n",
"${TM_SELECTED_TEXT:${2:add info here}}\n",
"</blockquote>\n"
],
"description": "callout admonition caution info note tip warning"
},
"fenced code block": {
"prefix": "#codeblock",
"body": ["```${1|apache,bash,console,diff,Dockerfile,env,go,hcl,ini,json,lisp,md,powershell,shell,sql,text,tf,tsx,yaml|}", "${TM_SELECTED_TEXT}$0", "```"],
"description": "fenced code block"
},
"image": {
"prefix": "#image",
"body": "![${TM_SELECTED_TEXT:${1:alt}}](${2:url})$0",
"description": "image"
},
"tabs": {
"prefix": "#tabs",
"body": [
"<div class=\"tabs\">\n",
"${1:optional description}\n",
"## ${2:tab title}\n",
"${TM_SELECTED_TEXT:${3:first tab content}}\n",
"## ${4:tab title}\n",
"${5:second tab content}\n",
"## ${6:tab title}\n",
"${7:third tab content}\n",
"</div>\n"
],
"description": "tabs"
}
}
Loading