From 03faad163d51bf3ffb5721e6a2a0c81439ad4435 Mon Sep 17 00:00:00 2001 From: jgmdev Date: Tue, 15 Nov 2022 14:31:02 -0400 Subject: language_php: better match class type inline vars Use proper block_comment thanks to lite-xl/lite-xl#1202 --- plugins/language_php.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'plugins') 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 = { -- cgit v1.2.3