aboutsummaryrefslogtreecommitdiff
path: root/helix-22.03-x86_64-windows/runtime/queries/cmake
diff options
context:
space:
mode:
authorIndrajith K L2022-12-03 17:00:20 +0530
committerIndrajith K L2022-12-03 17:00:20 +0530
commitf5c4671bfbad96bf346bd7e9a21fc4317b4959df (patch)
tree2764fc62da58f2ba8da7ed341643fc359873142f /helix-22.03-x86_64-windows/runtime/queries/cmake
downloadcli-tools-windows-f5c4671bfbad96bf346bd7e9a21fc4317b4959df.tar.gz
cli-tools-windows-f5c4671bfbad96bf346bd7e9a21fc4317b4959df.tar.bz2
cli-tools-windows-f5c4671bfbad96bf346bd7e9a21fc4317b4959df.zip
Adds most of the toolsHEADmaster
Diffstat (limited to 'helix-22.03-x86_64-windows/runtime/queries/cmake')
-rw-r--r--helix-22.03-x86_64-windows/runtime/queries/cmake/highlights.scm97
-rw-r--r--helix-22.03-x86_64-windows/runtime/queries/cmake/indents.toml12
-rw-r--r--helix-22.03-x86_64-windows/runtime/queries/cmake/injections.scm4
-rw-r--r--helix-22.03-x86_64-windows/runtime/queries/cmake/textobjects.scm12
4 files changed, 125 insertions, 0 deletions
diff --git a/helix-22.03-x86_64-windows/runtime/queries/cmake/highlights.scm b/helix-22.03-x86_64-windows/runtime/queries/cmake/highlights.scm
new file mode 100644
index 0000000..71e9b5d
--- /dev/null
+++ b/helix-22.03-x86_64-windows/runtime/queries/cmake/highlights.scm
@@ -0,0 +1,97 @@
+[
+ (quoted_argument)
+ (bracket_argument)
+ ] @string
+
+(variable) @variable
+
+[
+ (bracket_comment)
+ (line_comment)
+ ] @comment
+
+(normal_command (identifier) @function)
+
+["ENV" "CACHE"] @string.special.symbol
+["$" "{" "}" "<" ">"] @punctuation
+["(" ")"] @punctuation.bracket
+
+[
+ (function)
+ (endfunction)
+ (macro)
+ (endmacro)
+ ] @keyword.function
+
+[
+ (if)
+ (elseif)
+ (else)
+ (endif)
+ ] @keyword.control.conditional
+
+[
+ (foreach)
+ (endforeach)
+ (while)
+ (endwhile)
+ ] @keyword.control.repeat
+
+(function_command
+ (function)
+ . (argument) @function
+ (argument)* @variable.parameter
+ )
+
+(macro_command
+ (macro)
+ . (argument) @function.macro
+ (argument)* @variable.parameter
+ )
+
+(normal_command
+ (identifier) @function.builtin
+ . (argument) @variable
+ (#match? @function.builtin "^(?i)(set)$"))
+
+(normal_command
+ (identifier) @function.builtin
+ . (argument)
+ (argument) @constant
+ (#match? @constant "^(?:PARENT_SCOPE|CACHE)$")
+ (#match? @function.builtin "^(?i)(unset)$"))
+
+(normal_command
+ (identifier) @function.builtin
+ . (argument)
+ . (argument)
+ (argument) @constant
+ (#match? @constant "^(?:PARENT_SCOPE|CACHE|FORCE)$")
+ (#match? @function.builtin "^(?i)(set)$")
+ )
+
+((argument) @constant.builtin.boolean
+ (#match? @constant.builtin.boolean "^(?i)(?:1|on|yes|true|y|0|off|no|false|n|ignore|notfound|.*-notfound)$")
+ )
+
+(if_command
+ (if)
+ (argument) @operator
+ (#match? @operator "^(?:NOT|AND|OR|COMMAND|POLICY|TARGET|TEST|DEFINED|IN_LIST|EXISTS|IS_NEWER_THAN|IS_DIRECTORY|IS_SYMLINK|IS_ABSOLUTE|MATCHES|LESS|GREATER|EQUAL|LESS_EQUAL|GREATER_EQUAL|STRLESS|STRGREATER|STREQUAL|STRLESS_EQUAL|STRGREATER_EQUAL|VERSION_LESS|VERSION_GREATER|VERSION_EQUAL|VERSION_LESS_EQUAL|VERSION_GREATER_EQUAL)$")
+)
+
+(normal_command
+ (identifier) @function.builtin
+ . (argument)
+ (argument) @constant
+ (#match? @constant "^(?:ALL|COMMAND|DEPENDS|BYPRODUCTS|WORKING_DIRECTORY|COMMENT|JOB_POOL|VERBATIM|USES_TERMINAL|COMMAND_EXPAND_LISTS|SOURCES)$")
+ (#match? @function.builtin "^(?i)(add_custom_target)$")
+ )
+
+(normal_command
+ (identifier) @function.builtin
+ (argument) @constant
+ (#match? @constant "^(?:OUTPUT|COMMAND|MAIN_DEPENDENCY|DEPENDS|BYPRODUCTS|IMPLICIT_DEPENDS|WORKING_DIRECTORY|COMMENT|DEPFILE|JOB_POOL|VERBATIM|APPEND|USES_TERMINAL|COMMAND_EXPAND_LISTS)$")
+ (#match? @function.builtin "^(?i)(add_custom_command)$")
+ )
+
diff --git a/helix-22.03-x86_64-windows/runtime/queries/cmake/indents.toml b/helix-22.03-x86_64-windows/runtime/queries/cmake/indents.toml
new file mode 100644
index 0000000..8b886a4
--- /dev/null
+++ b/helix-22.03-x86_64-windows/runtime/queries/cmake/indents.toml
@@ -0,0 +1,12 @@
+indent = [
+ "if_condition",
+ "foreach_loop",
+ "while_loop",
+ "function_def",
+ "macro_def",
+ "normal_command",
+]
+
+outdent = [
+ ")"
+]
diff --git a/helix-22.03-x86_64-windows/runtime/queries/cmake/injections.scm b/helix-22.03-x86_64-windows/runtime/queries/cmake/injections.scm
new file mode 100644
index 0000000..6cb6c25
--- /dev/null
+++ b/helix-22.03-x86_64-windows/runtime/queries/cmake/injections.scm
@@ -0,0 +1,4 @@
+((line_comment) @injection.content
+ (#set! injection.language "comment"))
+((bracket_comment) @injection.content
+ (#set! injection.language "comment"))
diff --git a/helix-22.03-x86_64-windows/runtime/queries/cmake/textobjects.scm b/helix-22.03-x86_64-windows/runtime/queries/cmake/textobjects.scm
new file mode 100644
index 0000000..1fa9ded
--- /dev/null
+++ b/helix-22.03-x86_64-windows/runtime/queries/cmake/textobjects.scm
@@ -0,0 +1,12 @@
+(macro_def) @function.around
+
+(argument) @parameter.inside
+
+[
+ (bracket_comment)
+ (line_comment)
+] @comment.inside
+
+(line_comment)+ @comment.around
+
+(bracket_comment) @comment.around \ No newline at end of file