Closed ulizama closed 9 months ago
Also, in your screenshot, it doesn't look like get/any/post/hook
keywords were syntax highlighted. Does the additional syntax highlighting work for you? If you have other syntax highlighting extensions enabled (e.g. Better Perl Syntax
) they can interfere with the Navigator's highlighting.
Updated the code with the suggested fixes.
I also updated the screenshot with the Better Perl Syntax disabled to show the correct highlights from the plugin. All Dancer keywords are being correctly highlighted.
Thanks for the commit and I appreciate your patience on this one. While I was merging your code, it made me realize I had a few long-standing issues in there. For example, pltags was double looping over all code in CleanForBalanced
which was slower than needed. By preprocessing the code and refactoring into a class, the tagger is now better suited for extensions like this one. For example, the Dancer2 code is now it's own function: https://github.com/bscan/PerlNavigator/blob/a270c5e5eab1f1c4091eee30163a1300dc6c2a11/server/src/perl/lib_bs22/pltags.pm#L376
I like the idea of supporting more frameworks and your Dancer2 example is great code for others to follow. Thanks again for the ticket and the pull request. I will do some more testing before releasing to the marketplace, but let me know if I broke anything during the merge. Thanks!
84 This pull requests does some improvements on the Dancer/Dancer2 support.
ajax
,patch
,del
hook
syntax on Dancerany ["get", 'post'] => "/route/any" => sub {
/my/route
=>get /my/route
to make it easier to differentiate between routes using the same name