in reply to VS Code plugins for Perl

Not helpful: I still think ViM For The Win

Helpful:
What Perl are you using?
When I try installing Perl::LanguageSever on my StrawberryPerl 5.38.0x64, it fails on the dependency IO::AIO.
Without digging too deep: AIO.xs:778:30: error: incompatible types when assigning to type 'struct w32_stat' from type 'struct _stat64'
Pretty sure it's Perl and Win64 headers not playing nicely

So I tried Portable StrawberryPerl 5.32.1x32 (The newest x32 available) and IO::AIO installs.
Next, AnyEvent needs to be force installed cpanm AnyEvent --force because Windows
But after that, Perl::LanguageServer installs.

Probably better to fix IO::AIO on x64, but I don't have time to dig in to that

Not the best, but if you don't mind developing in x32 then this'll get you going

Replies are listed 'Best First'.
Re^2: VS Code plugins for Perl
by choroba (Cardinal) on Jul 09, 2024 at 09:33 UTC
    Ouch, IO::AIO is Lehmannware and doesn't seem to do well on MSWin.

    What about PLS instead? It doesn't have any tester results for MSWin, which is suspicious...

    map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
Re^2: VS Code plugins for Perl
by pryrt (Abbot) on Jul 09, 2024 at 13:14 UTC
    Yeah, I was never able to get Perl::LanguageServer to work on 64bit Strawberry, either (though it looks like you tried harder than I did).

    PerlNavigator works with my Strawberry v5.38.0 for MSWin32-x64-multi-thread. Its homepage gives examples of how to set it up for VS Code, Sublime, emacs, neovim, and others... And it is starting to work with an alpha NppLspClient plugin on Notepad++, using the config below:

    [lspservers.perl] mode = "io" executable = 'c:\\usr\\local\\bin\\perlnavigator.exe' args = '--stdio' auto_start_server = true

    The upsides are that PerlNavigator uses the Microsoft LSP library, so is known to work well on Windows; and it doesn't have difficulties installing module prerequisites, because it's a standalone app, not a Perl-based application or module(s). The downside is, it's not a Perl-based application or module(s) ;-).


    update: sorry, I hadn't seen haj's post yet when I replied to this one. but mine does include tangential information which might be of use to non-VSCode users wanting similar functionality on other Windows editors.
Re^2: VS Code plugins for Perl
by cormanaz (Deacon) on Jul 09, 2024 at 15:13 UTC
    I did manage to get Perl::LanguageServer installed (in WSL2/Ubuntu), ad VS Code confirms it is installed. This is what is confusing. Plus I don't get any errors when I hit run and debug it exits without running or debugging the code.
Re^2: VS Code plugins for Perl
by cormanaz (Deacon) on Jul 09, 2024 at 15:10 UTC
    It's whatever comes stock with Ubuntu. Strawberry I guess?
      If you're on an actual Ubuntu desktop, then "perl -v" gives the answer you're looking for. Strawberry is a distribution of perl for Windows, which is what I think most people assumed when you said VSCode.

      (this conversation will likely now chain into "don't use the system perl for development, use perlbrew" or something like that. I'd recommend just using system perl until you have everything working, then consider installing your own with perlbrew)