diff options
author | ndytts <ndytts@gmail.com> | 2023-11-11 20:28:51 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-12 02:28:51 +0100 |
commit | 698a3ec3ab3bc6d0707e3a84acffb7af1e31fd57 (patch) | |
tree | 3419999b93f2326bad7396b4c28c6cea8067217b /plugins | |
parent | 3cd8021ef48e4df2716b9388d179da24c523a76c (diff) | |
download | lite-xl-plugins-698a3ec3ab3bc6d0707e3a84acffb7af1e31fd57.tar.gz lite-xl-plugins-698a3ec3ab3bc6d0707e3a84acffb7af1e31fd57.zip |
fix comments and strings in language_cmake.lua (#339)
* fix comments and strings in language_cmake.lua
* Update manifest.json
* Remove unneeded pattern in language_cmake.lua
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/language_cmake.lua | 16 |
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 = {}, } |