diff --git a/lockfile.json b/lockfile.json index 718450e15..0f623b2a9 100644 --- a/lockfile.json +++ b/lockfile.json @@ -317,6 +317,9 @@ "kotlin": { "revision": "494fb7644a9d2bbe4c7a0c5db2ef94d2aad6b0d8" }, + "kusto": { + "revision": "8353a1296607d6ba33db7c7e312226e5fc83e8ce" + }, "lalrpop": { "revision": "06ae1b6c26e23c77c7fb86d51dddad62b42e66b0" }, diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua index 17e59046a..9c4ac31f9 100644 --- a/lua/nvim-treesitter/parsers.lua +++ b/lua/nvim-treesitter/parsers.lua @@ -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", diff --git a/queries/kusto/highlights.scm b/queries/kusto/highlights.scm new file mode 100644 index 000000000..825f49b35 --- /dev/null +++ b/queries/kusto/highlights.scm @@ -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 diff --git a/queries/kusto/injections.scm b/queries/kusto/injections.scm new file mode 100644 index 000000000..321c90add --- /dev/null +++ b/queries/kusto/injections.scm @@ -0,0 +1,2 @@ +((comment) @injection.content + (#set! injection.language "comment"))