aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorrxi <rxi@users.noreply.github.com>2020-06-25 10:59:08 +0100
committerGitHub <noreply@github.com>2020-06-25 10:59:08 +0100
commit76144065f71d08ec5eb0ccc7309d847c871a3d11 (patch)
treee04116b3536cc0482b6c13ef1165113e05d43618 /plugins
parent2446f3c89b54c4554bd54c5f3a1e6d4a8471cac2 (diff)
parentdff4483c481a8f5ae539afb2b427c9dfe89f4a55 (diff)
downloadlite-xl-plugins-76144065f71d08ec5eb0ccc7309d847c871a3d11.tar.gz
lite-xl-plugins-76144065f71d08ec5eb0ccc7309d847c871a3d11.zip
Merge pull request #66 from lordadamson/master
CMake syntax highlighting
Diffstat (limited to 'plugins')
-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 = {},
+}