aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjgmdev <jgmdev@gmail.com>2022-11-15 14:31:02 -0400
committerjgmdev <jgmdev@gmail.com>2022-11-15 14:35:44 -0400
commit03faad163d51bf3ffb5721e6a2a0c81439ad4435 (patch)
tree2688547b2554d74c1394d25f735685fb9d0a492e
parentf4af0d9edf7549762110c84e96d66d139c39feb2 (diff)
downloadlite-xl-plugins-03faad163d51bf3ffb5721e6a2a0c81439ad4435.tar.gz
lite-xl-plugins-03faad163d51bf3ffb5721e6a2a0c81439ad4435.zip
language_php: better match class type inline vars
Use proper block_comment thanks to lite-xl/lite-xl#1202
-rw-r--r--plugins/language_php.lua7
1 files changed, 3 insertions, 4 deletions
diff --git a/plugins/language_php.lua b/plugins/language_php.lua
index 8b3371a..bea6b85 100644
--- a/plugins/language_php.lua
+++ b/plugins/language_php.lua
@@ -79,10 +79,10 @@ local inline_variables = {
{ pattern = "{()%$[%a_][%w_]*()}",
type = { "keyword", "keyword2", "keyword" }
},
- { pattern = "%$[%a_][%w_]*()%[()%w*()%]",
+ { pattern = "%$[%a_][%w_]*()%[()[%w_]*()%]",
type = { "keyword2", "keyword", "string", "keyword" }
},
- { pattern = "%$[%a_][%w_]*()%->()%w+",
+ { pattern = "%$[%a_][%w_]*()%->()%a[%w_]*",
type = { "keyword2", "keyword", "symbol" }
},
{ pattern = "%$[%a_][%w_]*", type = "keyword2" },
@@ -335,8 +335,7 @@ end
syntax.add {
name = "PHP",
files = { "%.php$", "%.phtml" },
- comment = "//",
- block_comment = {"/*", "*/"},
+ block_comment = { "<!--", "-->" },
patterns = {
{
regex = {