1# Snippets
2
3Place your snippet files in `~/.config/zed/snippets` directory.
4
5Ex: If you want to create snippets that targeted JavaScript files, your file would be `javascript.json` and it might contain:
6
7```json
8{
9 "Log to the console": {
10 "prefix": "log",
11 "body": ["console.log($1);", "$0"],
12 "description": "Log to the console"
13 },
14 "Log warning to console": {
15 "prefix": "warn",
16 "body": ["console.warn($1);", "$0"],
17 "description": "Log warning to the console"
18 },
19 "Log error to console": {
20 "prefix": "error",
21 "body": ["console.error($1);", "$0"],
22 "description": "Log error to the console"
23 },
24 "Throw Exception": {
25 "prefix": "throw",
26 "body": ["throw new Error(\"$1\");", "$0"],
27 "description": "Throw Exception"
28 }
29}
30```
31
32For more configuration information, see the [`simple-completion-language-server` instructions](https://github.com/zed-industries/simple-completion-language-server/tree/main).