add log tree-sitter (#8916)
* add log tree-sitter
* better highlight queries
commitf8d261cd20c4f74c89ab103ed42b01f029be1fec
authorTudyx <56633664+Tudyx@users.noreply.github.com>
dateWed 29 Nov 2023, 02:42 (3 years ago)
parent0739d13
book/src/generated/lang-support.md+1
@@ -91,6 +91,7 @@
9191| llvm | ✓ | ✓ | ✓ | |
9292| llvm-mir | ✓ | ✓ | ✓ | |
9393| llvm-mir-yaml | ✓ | | ✓ | |
94+| log | ✓ | | | |
9495| lpf | ✓ | | | |
9596| lua | ✓ | ✓ | ✓ | `lua-language-server` |
9697| make | ✓ | | | |
languages.toml+9
@@ -2943,3 +2943,12 @@ indent = { tab-width = 2, unit = " " }
29432943[[grammar]]
29442944name = "dbml"
29452945source = { git = "https://github.com/dynamotn/tree-sitter-dbml", rev = "2e2fa5640268c33c3d3f27f7e676f631a9c68fd9" }
2946+
2947+[[language]]
2948+name = "log"
2949+scope = "source.log"
2950+file-types = ["log"]
2951+
2952+[[grammar]]
2953+name = "log"
2954+source = { git = "https://github.com/Tudyx/tree-sitter-log", rev = "62cfe307e942af3417171243b599cc7deac5eab9" }
runtime/queries/log/highlights.scmnew file+10
@@ -0,0 +1,10 @@
1+(trace) @comment
2+(debug) @hint
3+(info) @info
4+(warn) @warning
5+(error) @error
6+(year_month_day) @keyword
7+(time) @constant
8+(string_literal) @string
9+(number) @constant.numeric
10+(constant) @constant.builtin