diff options
author | jgmdev <jgmdev@gmail.com> | 2022-11-15 14:31:02 -0400 |
---|---|---|
committer | jgmdev <jgmdev@gmail.com> | 2022-11-15 14:35:44 -0400 |
commit | 03faad163d51bf3ffb5721e6a2a0c81439ad4435 (patch) | |
tree | 2688547b2554d74c1394d25f735685fb9d0a492e /plugins/language_php.lua | |
parent | f4af0d9edf7549762110c84e96d66d139c39feb2 (diff) | |
download | lite-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
Diffstat (limited to 'plugins/language_php.lua')
-rw-r--r-- | plugins/language_php.lua | 7 |
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 = { |