Skip to content

Commit 0f5ec77

Browse files
snippets: update comments and add comment-section
Update comments to use ;; --------- style, more visually appealing Add comment-section with start & end line comments
1 parent 7e6c480 commit 0f5ec77

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Clone the repository to the user level configuration location for Clojure LSP, e
1515
### Docs / comments
1616
* `comment-heading` - describe purpose of the namespace
1717
* `comment-separator` - logically separate code sections, helps identify opportunities to refactor to other name spaces
18+
* `comment-section` - logically separate large code sections with start and end line comments
1819

1920
### Repl Driven Development
2021
* `rich-comment` - comment block

config.edn

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,30 @@
1111
;; Snippets with $current-form only work when used in front of a form
1212
;; otherwise the snippet will not appear in the auto-complete drop-down
1313
;; Custom Snippets
14+
;; --------------------------------------------------
15+
;; LSP snippets
16+
;; https://clojure-lsp.io/features/#snippets
17+
18+
;; Locally defined snippets
1419
:additional-snippets
15-
[;; Documentation
16-
{:name "comment-heading"
20+
[{:name "comment-heading"
1721
:detail "Comment Header"
1822
:snippet
19-
";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
20-
;; ${1:Namespace summary title}
23+
";; --------------------------------------------------
24+
;; ${1:Heading summary title}
2125
;;
22-
;; ${2:Brief description}\n;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\n$0"}
26+
;; ${2:Brief description}\n;; --------------------------------------------------\n\n$0"}
2327

2428
{:name "comment-separator"
2529
:detail "Comment Separator"
2630
:snippet
27-
";; ${1:Namespace summary title}\n;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\n$0"}
31+
";; --------------------------------------------------\n;; ${1:Section title}\n\n$0"}
32+
33+
{:name "comment-section"
34+
:detail "Comment Section"
35+
:snippet
36+
";; --------------------------------------------------\n;; ${1:Section title}\n\n$0\n\n
37+
;; End of $1\n;; --------------------------------------------------\n\n"}
2838

2939
{:name "rich-comment"
3040
:detail "Create rich comment"

0 commit comments

Comments
 (0)