From dff4483c481a8f5ae539afb2b427c9dfe89f4a55 Mon Sep 17 00:00:00 2001 From: Adham Zahran Date: Wed, 24 Jun 2020 19:22:50 +0200 Subject: CMake syntax highlighting --- plugins/language_cmake.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 plugins/language_cmake.lua (limited to 'plugins/language_cmake.lua') 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 = {}, +} -- cgit v1.2.3