aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/language_cmake.lua16
1 files changed, 9 insertions, 7 deletions
diff --git a/plugins/language_cmake.lua b/plugins/language_cmake.lua
index 19f1aa5..aa6077c 100644
--- a/plugins/language_cmake.lua
+++ b/plugins/language_cmake.lua
@@ -4,14 +4,16 @@ local syntax = require "core.syntax"
syntax.add {
name = "CMake",
files = { "%.cmake$", "CMakeLists.txt$" },
- comment = "//",
+ comment = "#",
+ block_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" },
+ { pattern = { '#%[=*%[', '%]=*%]' }, type = "comment" },
+ { pattern = "#.*", 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 = {},
}