aboutsummaryrefslogtreecommitdiff
path: root/plugins/language_cmake.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/language_cmake.lua')
-rw-r--r--plugins/language_cmake.lua15
1 files changed, 15 insertions, 0 deletions
diff --git a/plugins/language_cmake.lua b/plugins/language_cmake.lua
new file mode 100644
index 0000000..78354e1
--- /dev/null
+++ b/plugins/language_cmake.lua
@@ -0,0 +1,15 @@
+local syntax = require "core.syntax"
+
+syntax.add {
+ files = { "%.cmake$", "CMakeLists.txt$" },
+ comment = "//",
+ patterns = {
+ { pattern = { "#", "[^\\]\n" }, type = "comment" },
+ { pattern = { '"', '"', '\\' }, type = "string" },
+ { pattern = { "'", "'", '\\' }, type = "string" },
+ { pattern = "[%a_][%w_]*%f[(]", type = "function" },
+ { pattern = "[%a_][%w_]*", type = "normal" },
+ { pattern = "%${[%a_][%w_]*%}", type = "operator" },
+ },
+ symbols = {},
+}