feat(kusto): add kusto parser and highlights (#5632)

* feat(kusto): add kusto parser and highlights

* feat(kusto): improve highlights

* Update queries/kusto/highlights.scm

Co-authored-by: ObserverOfTime <chronobserver@disroot.org>

* chore(kusto): remove unneeded filetype

---------

Co-authored-by: Willem Jan Noort <noortw01@heiway.net>
Co-authored-by: ObserverOfTime <chronobserver@disroot.org>
This commit is contained in:
Willem-J-an 2023-11-08 10:11:19 +01:00 committed by GitHub
parent ec09e52d41
commit 629cae1f0f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 65 additions and 0 deletions

View file

@ -317,6 +317,9 @@
"kotlin": {
"revision": "494fb7644a9d2bbe4c7a0c5db2ef94d2aad6b0d8"
},
"kusto": {
"revision": "8353a1296607d6ba33db7c7e312226e5fc83e8ce"
},
"lalrpop": {
"revision": "06ae1b6c26e23c77c7fb86d51dddad62b42e66b0"
},

View file

@ -968,6 +968,14 @@ list.kotlin = {
maintainers = { "@SalBakraa" },
}
list.kusto = {
install_info = {
url = "https://github.com/Willem-J-an/tree-sitter-kusto",
files = { "src/parser.c" },
},
maintainers = { "@Willem-J-an" },
}
list.lalrpop = {
install_info = {
url = "https://github.com/traxys/tree-sitter-lalrpop",

View file

@ -0,0 +1,52 @@
(identifier) @variable
(let_keyword) @keyword
(function_call
(identifier) @function.call)
[
(type_cast_function)
(to_scalar_function)
(between_function)
(datatable_function)
] @function.call
(typed_parameter
(identifier) @parameter)
(function_arguments (identifier) @parameter)
[
(binary_operator)
(compound_keywords)
(operator)
(range_operator)
(join_operator)
(sub_operator)
(to_operator)
(mv_apply_operator)
(sort_keyword)
] @keyword.operator
(string) @string
(number) @number
(bool) @boolean
(null) @constant.builtin
(comment) @comment @spell
(type) @type
(join_types) @type.qualifier
[
"("
")"
"["
"]"
"{"
"}"
] @punctuation.bracket
[
","
":"
(pipe)
] @punctuation.delimiter

View file

@ -0,0 +1,2 @@
((comment) @injection.content
(#set! injection.language "comment"))