source: highlight perl signatures as Type instead of Error
authorMischa POSLAWSKY <perl@shiar.org>
Tue, 31 Oct 2023 21:25:20 +0000 (22:25 +0100)
committerMischa POSLAWSKY <perl@shiar.org>
Tue, 31 Oct 2023 23:41:19 +0000 (00:41 +0100)
Enable Vim option for experimental code feature used in perl.plp,
and distinguish it from adjacent Identifiers.

base.css
source.plp

index 7cafc571efa0afb2f22abd64337ab2b25e0097f8..ffa59a56a697250aff18b8b6def61127724824f8 100644 (file)
--- a/base.css
+++ b/base.css
@@ -504,10 +504,10 @@ table.dimap {
 /* code syntax */
 .sy-comment    { color: #888 }
 .sy-constant   { color: #008 }
-.sy-type,
 .sy-identifier { color: #804 }
 .sy-statement  { }
 .sy-preProc    { }
+.sy-type,
 .sy-special    { color: #408 }
 .sy-error      { font-weight: bold; background-color: #F00; color: #FFF }
 .sy-todo       { background-color: #FF0 }
index b586dbe2b028d439a5ee069b2520cc41c04e3e15..e07087d6115ac38bf19089f669d926a0631aef9d 100644 (file)
@@ -99,7 +99,10 @@ else {
                delete $Text::VimColor::SYNTAX_TYPE{Underlined};
                return Text::VimColor->new(
                        file => $path,
-                       vim_options => [@Text::VimColor::VIM_OPTIONS, '+:set enc=utf-8'],
+                       vim_options => [@Text::VimColor::VIM_OPTIONS,
+                               '+:set enc=utf-8',
+                               '+:let perl_sub_signatures=1',
+                       ],
                )->marked;
        }) {
                my %TYPETAG = (