Skip to content

Commit

Permalink
Add JSON grammar
Browse files Browse the repository at this point in the history
  • Loading branch information
akimon658 committed Jan 7, 2025
1 parent a8ca7a5 commit f9928e1
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions _config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import rehypeRaw from "rehype-raw"
import typography from "@tailwindcss/typography"
import Parser, { type Language } from "tree-sitter"
import Bash from "tree-sitter-bash"
import JSON from "tree-sitter-json"
import Go from "tree-sitter-go"
import Lua from "@tree-sitter-grammars/tree-sitter-lua"
import Markdown from "@tree-sitter-grammars/tree-sitter-markdown"
Expand Down Expand Up @@ -58,6 +59,7 @@ const parseCode = (code: string, lang: string) => {
go: Go,
html: HTML,
javascript: JavaScript,
json: JSON,
lua: Lua,
markdown: Markdown,
shell: Bash,
Expand Down
1 change: 1 addition & 0 deletions deno.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"tree-sitter-go": "npm:[email protected]",
"tree-sitter-html": "npm:[email protected]",
"tree-sitter-javascript": "npm:[email protected]",
"tree-sitter-json": "npm:[email protected]",
"tree-sitter-typescript": "npm:[email protected]",
},
"fmt": {
Expand Down
9 changes: 9 additions & 0 deletions deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions src/_vscode.css
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,10 @@
color: var(--vsc-blue-green);
}

.ts-pair>.ts-string:first-child {
color: var(--vsc-light-blue);
}

.ts-predefined_type>.ts-string {
color: var(--vsc-blue-green);
}
Expand Down

0 comments on commit f9928e1

Please sign in to comment.