Feature request: Perl test provider
This is probably non trivial, so acknowledging that here goes:
It would be amazing if Perl Navigator could provide a so called "Test Provider" for vscode.
There is one here but alas it doesnt seem to work for me (which could just be me). The good news is that its also MIT licensed so could potentially just be merged in to Perl Navigator and fixed?
Part of the difficulty here is that most perl test frameworks don't let you run individual tests from a suite, so you won't get as much milage as other languages.
On Mon, Jul 28, 2025, 16:46 Dean Hamstead @.***> wrote:
djzort created an issue (bscan/PerlNavigator#167) https://github.com/bscan/PerlNavigator/issues/167
This is probably non trivial, so acknowledging that here goes:
It would be amazing if Perl Navigator could provide a so called "Test Provider" for vscode.
There is one here https://github.com/Nihilus118/vscode-perl-test-provider but alas it doesnt seem to work for me (which could just be me). The good news is that its also MIT licensed so could potentially just be merged in to Perl Navigator and fixed?
— Reply to this email directly, view it on GitHub https://github.com/bscan/PerlNavigator/issues/167, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFURPKTCQSY2B4IKEJ4AG433KYSTVAVCNFSM6AAAAACCQ7TJXSVHI2DSMVQWIX3LMV43ASLTON2WKOZTGI3DSOJZGAYTCNI . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Thanks, that's a good idea. However, one of the issues with the vscode testing API is that it's not implemented via the Language Server Protocol or any other standard protocol, so it's vscode only. When possible, I try to make the features in the Perl Navigator editor agnostic. Although as a counterpoint, the bundled TextMate grammars are a good example of something entirely vscode-specific.
There's also a possibility of adding code lenses via the Language Server to allow specific single actions, such as running individual tests or benchmarks. I believe that's the approach taken by Go: https://github.com/golang/tools/blob/master/gopls/doc/codelenses.md . Doesn't seem that nice though compared to the test provider. There's some good discussion about the different approaches here: https://github.com/golang/go/issues/67400
The easiest approach would be if someone submitted whatever is needed to fix or expand the existing Test Provider. The author is still active in developing Perl Extensions, and released a fix for his debug adapter recently.
More discussion available in #21.
TextMate grammars aren't VSCode specific they are used in many other editors Atom, sublime, github, shiki, TextMate 2.0 etc
Hi @RedCMD, agreed that TextMate grammars are used quite widely. I believe the TextMate perl grammar in this repo is currently the most maintained Perl TextMate grammar, which would be great to be the default vscode grammar and add to github, sublime, etc. There are also additional grammars in https://github.com/bscan/PerlNavigator/tree/main/syntaxes that are injection grammars based on Perl's dynamic syntax. For example, when you use Object::Pad;, then you get highlighting for all of Object::Pad's keywords.
When I said that the bundled TextMate grammars are vscode-specific, I meant in context of this project. From a vscode perspective, "Perl Navigator" is an extension containing a language server and a collection of TextMate grammars. When used within emacs/neovim/sublime, "Perl Navigator" is only a language server. Similarly, the test provider would only be usable within vscode and would not be part of the langauge server.