Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'runtime/queries/kconfig/highlights.scm')
-rw-r--r--runtime/queries/kconfig/highlights.scm86
1 files changed, 86 insertions, 0 deletions
diff --git a/runtime/queries/kconfig/highlights.scm b/runtime/queries/kconfig/highlights.scm
new file mode 100644
index 00000000..8baf3988
--- /dev/null
+++ b/runtime/queries/kconfig/highlights.scm
@@ -0,0 +1,86 @@
+[
+ "source"
+ "osource"
+ "rsource"
+ "orsource"
+] @keyword.control.import
+
+[
+ "mainmenu"
+ "config"
+ "configdefault"
+ "menuconfig"
+ "choice"
+ "endchoice"
+ "comment"
+ "menu"
+ "endmenu"
+ "prompt"
+ "default"
+ "range"
+ "help"
+ (optional)
+ (modules)
+] @keyword
+
+[
+ "if"
+ "endif"
+ "depends on"
+ "select"
+ "imply"
+ "visible if"
+] @keyword.control.conditional
+
+[
+ "def_bool"
+ "def_tristate"
+] @keyword.function
+
+[
+ "||"
+ "&&"
+ "="
+ "!="
+ "<"
+ ">"
+ "<="
+ ">="
+ "!"
+] @operator
+
+[
+ "bool"
+ "tristate"
+ "int"
+ "hex"
+ "string"
+] @type.builtin
+
+[ "(" ")" ] @punctuation.bracket
+
+(macro_variable ["$(" ")"] @punctuation.special)
+
+(symbol) @variable
+
+[
+ (string)
+ (macro_content)
+ (text)
+] @string
+
+(config name: (name (symbol) @constant))
+(configdefault name: (name (symbol) @constant))
+(menuconfig name: (name (symbol) @constant))
+(choice name: (name (symbol) @constant))
+
+((symbol) @constant
+ (#match? @constant "[A-Z0-9]+"))
+
+(mainmenu name: (string) @markup.heading)
+(comment_entry name: (string) @markup.heading)
+(menu name: (string) @markup.heading)
+
+(source (string) @string.special.url @string.special)
+
+(comment) @comment