aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifest.json2
-rw-r--r--plugins/language_cmake.lua16
2 files changed, 10 insertions, 8 deletions
diff --git a/manifest.json b/manifest.json
index c484aca..6eae056 100644
--- a/manifest.json
+++ b/manifest.json
@@ -619,7 +619,7 @@
},
{
"description": "Syntax for the CMake build system language",
- "version": "0.1",
+ "version": "0.2",
"path": "plugins/language_cmake.lua",
"id": "language_cmake",
"mod_version": "3",
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 = {},
}