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

Commit ba35947

Browse files
snippets: vscode style for clojure and markdown
- global.json defines snippet definitions to include - clojure.json snippets for the Clojure language - markdow.json snippets for the Markdown language
1 parent 1d68cda commit ba35947

5 files changed

Lines changed: 116 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
- community: nvim-jqx plugin to view JSON files in neovim
66
- community: rest-nvim plugin to call REST endpoints from neovim
77
- mapping: `SPC g H` key mapping for GitSigns stage hunk (orginally mapped to `SPC g s` in AstroNvim)
8+
- snippets: luasnip vscode-style snippets for Clojure and Markdown
89

910

1011
# 2023-07-08

snippets/clojure.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"comment header": {
3+
"prefix": "comment-header",
4+
"body": [
5+
";; ---------------------------------------------------------\n;; ${1:Heading summary title}\n;;\n;; ${2:Brief description}\n;; ---------------------------------------------------------\n\n$0"
6+
],
7+
"description": "Comment Header"
8+
},
9+
"comment section": {
10+
"prefix": "comment-section",
11+
"body": [
12+
";; ---------------------------------------------------------\n;; ${1:Section title}\n\n$0\n\n\n;; End of $1\n;; ---------------------------------------------------------\n\n"
13+
],
14+
"description": "Comment Header"
15+
}
16+
}

snippets/global.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{}
2+

snippets/markdown.json

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
{
2+
"mkdocs button tag": {
3+
"prefix": "mkdocs-button",
4+
"body": ["{.md-button} ${0}"],
5+
"description": "MkDocs Button tag"
6+
},
7+
"mkdocs button target tag": {
8+
"prefix": "mkdocs-button-target-tag",
9+
"body": ["{target=_blank .md-button} ${0}"],
10+
"description": "MkDocs Button target blank tag"
11+
},
12+
"mkdocs button form": {
13+
"prefix": "mkdocs-button-form",
14+
"body": ["[${1:link text}](${2:URL}){target=_blank .md-button} ${0}"],
15+
"description": "MkDocs Button form"
16+
},
17+
"mkdocs link target blank tag": {
18+
"prefix": "mkdocs-link-target-blank-tag",
19+
"body": ["{target=_blank} ${0}"],
20+
"description": "MkDocs Link target blank tag"
21+
},
22+
"mkdocs link form": {
23+
"prefix": "mkdocs-link-form",
24+
"body": ["[${1:link-text}](${2:URL}){target=_blank .md-button} ${0}"],
25+
"description": "MkDocs Link form"
26+
},
27+
"mkdocs youtube embed": {
28+
"prefix": "mkdocs-youtube-embed",
29+
"body": [
30+
"<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}"
31+
],
32+
"description": "MkDocs YouTube Embed"
33+
},
34+
"mkdocs icon book": {
35+
"prefix": "mkdocs-icon-book",
36+
"body": [":fontawesome-solid-book-open:${0}"],
37+
"description": "MkDocs link target blank"
38+
},
39+
"mkdocs icon github": {
40+
"prefix": "mkdocs-icon-github",
41+
"body": [":fontawesome-brands-github:${0}"],
42+
"description": "MkDocs link target blank"
43+
},
44+
"mkdocs icon globe": {
45+
"prefix": "mkdocs-icon-globe",
46+
"body": [":globe_with_meridians:${0}"],
47+
"description": "MkDocs link target blank"
48+
},
49+
"mkdocs image github base url": {
50+
"prefix": "mkdocs-image-github-base-url",
51+
"body": [
52+
"https://raw.githubusercontent.com/practicalli/graphic-design/live/${0}"
53+
],
54+
"description": "MkDocs image GitHub base URL"
55+
},
56+
"mkdocs image form": {
57+
"prefix": "mkdocs-image-form",
58+
"body": [
59+
"![${1:alternative-text}](${2:url}#only-dark#{3}){align=left${4} loading=lazy style=\"height:150px;width:150px\"}${0}"
60+
],
61+
"description": "MkDocs Image form"
62+
},
63+
"mkdocs image GitHub form": {
64+
"prefix": "mkdocs-image-github-form",
65+
"body": [
66+
"![${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\"}"
67+
],
68+
"description": "MkDocs Image GitHub form"
69+
}
70+
}

snippets/package.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"name": "practicalli-snippets",
3+
"engines": {
4+
"vscode": "^1.11.0"
5+
},
6+
"contributes": {
7+
"snippets": [
8+
{
9+
"language": [
10+
"markdown",
11+
"global",
12+
"all"
13+
],
14+
"comment": "snippets accross several languages",
15+
"path": "./global.json"
16+
},
17+
{
18+
"language": "clojure",
19+
"path": "./clojure.json"
20+
},
21+
{
22+
"language": "markdown",
23+
"path": "./markdown.json"
24+
}
25+
]
26+
}
27+
}

0 commit comments

Comments
 (0)