Skip to content

Commit

Permalink
add log tree-sitter (#8916)
Browse files Browse the repository at this point in the history
* add log tree-sitter

* better highlight queries
  • Loading branch information
Tudyx authored Nov 29, 2023
1 parent 0739d13 commit f8d261c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions book/src/generated/lang-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
| llvm |||| |
| llvm-mir |||| |
| llvm-mir-yaml || || |
| log || | | |
| lpf || | | |
| lua |||| `lua-language-server` |
| make || | | |
Expand Down
9 changes: 9 additions & 0 deletions languages.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2943,3 +2943,12 @@ indent = { tab-width = 2, unit = " " }
[[grammar]]
name = "dbml"
source = { git = "https://github.com/dynamotn/tree-sitter-dbml", rev = "2e2fa5640268c33c3d3f27f7e676f631a9c68fd9" }

[[language]]
name = "log"
scope = "source.log"
file-types = ["log"]

[[grammar]]
name = "log"
source = { git = "https://github.com/Tudyx/tree-sitter-log", rev = "62cfe307e942af3417171243b599cc7deac5eab9" }
10 changes: 10 additions & 0 deletions runtime/queries/log/highlights.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
(trace) @comment
(debug) @hint
(info) @info
(warn) @warning
(error) @error
(year_month_day) @keyword
(time) @constant
(string_literal) @string
(number) @constant.numeric
(constant) @constant.builtin

0 comments on commit f8d261c

Please sign in to comment.