Skip to content
This repository has been archived by the owner on Apr 8, 2024. It is now read-only.

Commit

Permalink
snippets: vscode style for clojure and markdown
Browse files Browse the repository at this point in the history
- global.json defines snippet definitions to include
- clojure.json snippets for the Clojure language
- markdow.json snippets for the Markdown language
  • Loading branch information
practicalli-johnny committed Jul 12, 2023
1 parent 1d68cda commit ba35947
Show file tree
Hide file tree
Showing 5 changed files with 116 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- community: nvim-jqx plugin to view JSON files in neovim
- community: rest-nvim plugin to call REST endpoints from neovim
- mapping: `SPC g H` key mapping for GitSigns stage hunk (orginally mapped to `SPC g s` in AstroNvim)
- snippets: luasnip vscode-style snippets for Clojure and Markdown


# 2023-07-08
Expand Down
16 changes: 16 additions & 0 deletions snippets/clojure.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"comment header": {
"prefix": "comment-header",
"body": [
";; ---------------------------------------------------------\n;; ${1:Heading summary title}\n;;\n;; ${2:Brief description}\n;; ---------------------------------------------------------\n\n$0"
],
"description": "Comment Header"
},
"comment section": {
"prefix": "comment-section",
"body": [
";; ---------------------------------------------------------\n;; ${1:Section title}\n\n$0\n\n\n;; End of $1\n;; ---------------------------------------------------------\n\n"
],
"description": "Comment Header"
}
}
2 changes: 2 additions & 0 deletions snippets/global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{}

70 changes: 70 additions & 0 deletions snippets/markdown.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"mkdocs button tag": {
"prefix": "mkdocs-button",
"body": ["{.md-button} ${0}"],
"description": "MkDocs Button tag"
},
"mkdocs button target tag": {
"prefix": "mkdocs-button-target-tag",
"body": ["{target=_blank .md-button} ${0}"],
"description": "MkDocs Button target blank tag"
},
"mkdocs button form": {
"prefix": "mkdocs-button-form",
"body": ["[${1:link text}](${2:URL}){target=_blank .md-button} ${0}"],
"description": "MkDocs Button form"
},
"mkdocs link target blank tag": {
"prefix": "mkdocs-link-target-blank-tag",
"body": ["{target=_blank} ${0}"],
"description": "MkDocs Link target blank tag"
},
"mkdocs link form": {
"prefix": "mkdocs-link-form",
"body": ["[${1:link-text}](${2:URL}){target=_blank .md-button} ${0}"],
"description": "MkDocs Link form"
},
"mkdocs youtube embed": {
"prefix": "mkdocs-youtube-embed",
"body": [
"<p style=\"text-align:center\">\n <iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/${1:url-code}\" title=\"YouTube video player\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>\n</p> ${0}"
],
"description": "MkDocs YouTube Embed"
},
"mkdocs icon book": {
"prefix": "mkdocs-icon-book",
"body": [":fontawesome-solid-book-open:${0}"],
"description": "MkDocs link target blank"
},
"mkdocs icon github": {
"prefix": "mkdocs-icon-github",
"body": [":fontawesome-brands-github:${0}"],
"description": "MkDocs link target blank"
},
"mkdocs icon globe": {
"prefix": "mkdocs-icon-globe",
"body": [":globe_with_meridians:${0}"],
"description": "MkDocs link target blank"
},
"mkdocs image github base url": {
"prefix": "mkdocs-image-github-base-url",
"body": [
"https://raw.githubusercontent.com/practicalli/graphic-design/live/${0}"
],
"description": "MkDocs image GitHub base URL"
},
"mkdocs image form": {
"prefix": "mkdocs-image-form",
"body": [
"![${1:alternative-text}](${2:url}#only-dark#{3}){align=left${4} loading=lazy style=\"height:150px;width:150px\"}${0}"
],
"description": "MkDocs Image form"
},
"mkdocs image GitHub form": {
"prefix": "mkdocs-image-github-form",
"body": [
"![${1:alternative text}](https://raw.githubusercontent.com/practicalli/graphic-design/live/${2:URL}#only-dark${3}){align=left${4} loading=lazy style=\"height:150px;width:150px\"}"
],
"description": "MkDocs Image GitHub form"
}
}
27 changes: 27 additions & 0 deletions snippets/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "practicalli-snippets",
"engines": {
"vscode": "^1.11.0"
},
"contributes": {
"snippets": [
{
"language": [
"markdown",
"global",
"all"
],
"comment": "snippets accross several languages",
"path": "./global.json"
},
{
"language": "clojure",
"path": "./clojure.json"
},
{
"language": "markdown",
"path": "./markdown.json"
}
]
}
}

0 comments on commit ba35947

Please sign in to comment.