bscan / PerlNavigator

Perl Language Server that includes syntax checking, perl critic, and code navigation
MIT License
198 stars 39 forks source link

Add syntax highlighting for Syntax::Keyword::MultiSub #80

Open bscan opened 1 year ago

bscan commented 1 year ago

This would be defined here https://github.com/bscan/PerlNavigator/blob/main/syntaxes/perl-scopes.json, and pointing to another .json file. The goal would be highlighting the word multi here:

use Syntax::Keyword::MultiSub;
use experimental 'signatures';

multi sub max()          { return undef; }
multi sub max($x)        { return $x; }
multi sub max($x, @more) { my $y = max(@more);
                           return $x > $y ? $x : $y; }

say max(1, 2, 15, 3, 4);  # prints 15