in reply to Which IDE's show tooltips for Perl builtins?

Notepad++ does not do it on mouseover, but does pretty much what you want while typing if autocomplete is on, so typing in spl offers split or splice, while split( offers four formats, the first of which is split(/PATTERN/). Notepadqq is pretty close and available on Linux, which Notepad++ is not. I haven't looked to see whether qq offers the same autocomplete options.

Regards,

John Davies

Replies are listed 'Best First'.
Re^2: Which IDE's show tooltips for Perl builtins? (Notepad++)
by LanX (Saint) on Jul 26, 2022 at 15:21 UTC
    Thanks John,

    I wonder how accurate the infos are if they adapt automatically to the current Perl version.

    I once wrote that Re^3: POD: getting usage snippets from perldoc and wanted to expand it to a IDE agnostic support module, but don't wanna reinvent the wheel...

    > if autocomplete is on, so typing in spl offers split or splice

    FWIW: I didn't think about code completion yet, but that's a good point too.

    Will it also offer to insert a snippet with jump-points for the arguments?

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

      I wonder how accurate the infos are if they adapt automatically to the current Perl version.

      Above my knowledge grade, I fear. But the language support system is written using plugins, so it would be possible to write a different plugin for every Perl version and then select the one currently in use.

      Will it also offer to insert a snippet with jump-points for the arguments?

      Not in the version I am using, but that does not mean it could not be done using a different plugin, which may even exist. I haven't looked.

      Regards,

      John Davies

        I wonder how accurate the infos are if they adapt automatically to the current Perl version.

        I did a bulk conversion from the Perl 5.30 perlfunc.pod into the Notepad++ auto-completion file for Notepad++ in May 2020, which was a drastic improvement from the pre-v5.10 keywords available before (it didn't even have say!). (And recently, vinsworldcom and I collaborated on getting more of the pragmas into the auto-completion and syntax highlighting lists.) Since it's been a couple years now, I should probably go check for the changes from 5.30 to 5.36 and add those in.

        Above my knowledge grade, I fear. But the language support system is written using plugins, so it would be possible to write a different plugin for every Perl version and then select the one currently in use.

        Not exactly. The function auto-completion feature is built in to Notepad++, and that's what's providing the popups with the selectable variants (such as your example with split having four variants). The syntax highlighting is done by the Scintilla/Lexilla Perl lexer that is included in Notepad++. You could, in theory, change the autoCompletion\perl.xml every time you wanted to change Perl version, restarting Notepad++ after that change, but I'm not sure it's worth the effort. Regarding LSP, there are a couple of people that I know are working on LSP clients for Notepad++, though they haven't been officially released yet; but I don't think even those would be easy to customize to easily swap between Perl versions.

        Will it also offer to insert a snippet with jump-points for the arguments?
        Not in the version I am using, but that does not mean it could not be done using a different plugin, which may even exist

        Notepad++ doesn't have a built-in snippet-with-jump-point feature. There are plugins for that, including the QuickText plugin that vinsworldcom maintains.

Re^2: Which IDE's show tooltips for Perl builtins?
by LanX (Saint) on Jul 28, 2022 at 14:51 UTC
    I just installed Notepad++ and tried it out.

    > I haven't looked to see whether qq offers the same autocomplete options.

    only if you type a round bracket so qq( will show qq/ won't

    > while split( offers four formats,

    Hmm, yes after typing ( it offered to permute thru 4 alternatives by clicking arrow buttons.

    I couldn't find a key which helps permuting. Counterintuitively choosing between between the functions split and splice was possible with arrow-keys.

    And I failed to expand one of those parameter options, be it as verbatim text or active snippet.

    But they are kept shown while typing, when inside parens.

    There is a hot-key C-S-Space to show those options again, but for arguments again only after an explicit open parenthesis.

    DISCLAIMER: first time experience, I've never really worked with N++ before and might have missed some options.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

      > I haven't looked to see whether qq offers the same autocomplete options.
      Sorry - I was not being clear there. I was referring to notepadqq, the Linux package which approximates closely to notepad++.

      Regards,

      John Davies