Skip to content

Commit dd3ff8d

Browse files
committed
Use YASnippet highlighting for readme code-samples
1 parent ddc7b26 commit dd3ff8d

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,19 @@ This is not an exhaustive list, but are the most useful.
2828
This is primarily used for create snippet aliases. A snippet alias if a snippet
2929
that will expand another snippet when used. e.g.
3030

31-
```emacs-lisp
32-
;;; in js-mode/class
31+
**In `js-mode/class`:**
32+
33+
```yasnippet
3334
# name: class
3435
# --
3536
class ${1:Name} {
3637
$0
3738
}
39+
```
40+
41+
**In `js-mode/cl`:**
3842

39-
;;; in js-mode/cl
43+
```yasnippet
4044
# name: class
4145
# key: cl
4246
# type: command
@@ -60,7 +64,7 @@ Returns `FORMAT`, which is a format string with a custom spec:
6064

6165
An example of its use:
6266

63-
```text
67+
```yasnippet
6468
# -*- mode: snippet -*-
6569
# name: while ... { ... }
6670
# key: while
@@ -95,7 +99,7 @@ Preforms `BODY` after moving the point to the start of the trigger keyword.
9599
Without this, tests like `bolp` would meaninglessly fail because the cursor is
96100
always in front of the word that triggered this snippet.
97101

98-
``` text
102+
``` yasnippet
99103
# -*- mode: snippet -*-
100104
# name: .to_string()
101105
# key: ts
@@ -118,4 +122,4 @@ function aliases for your convenience:
118122

119123

120124
[yasnippet]: https://github.com/capitaomorte/yasnippet
121-
[Doom Emacs]: https://github.com/hlissner/doom-emacs
125+
[Doom Emacs]: https://github.com/hlissner/doom-emacs

0 commit comments

Comments
 (0)