Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^5: Which IDE's show tooltips for Perl builtins? (Notepad++)

by davies (Prior)
on Jul 27, 2022 at 14:11 UTC ( [id://11145782]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Which IDE's show tooltips for Perl builtins? (Notepad++)
in thread Which IDE's show tooltips for Perl builtins?

My use of terminology may be inaccurate, but it's certainly possible to add syntax highlighting for new languages. One example is markdown, for which there is an implementation at https://github.com/Edditoria/markdown-plus-plus. My thinking was that each version of Perl might have its own file, such as perl5036.xml, treating it as an independent language in the same way as markdown. This would avoid the need to reboot for different languages. But I may have misunderstood something. This is still above my knowledge grade.

Regards,

John Davies

Replies are listed 'Best First'.
Re^6: Which IDE's show tooltips for Perl builtins? (Notepad++)
by pryrt (Abbot) on Jul 27, 2022 at 14:18 UTC
    Yes, you are correct; I hadn't thought of doing it that way. You could make a separate User Defined Language (UDL) for each version of Perl, and define a separate autocompletion file for each of those Perl-version UDLs. Since the UDL features aren't as powerful as the built-in lexers, you would then be sacrificing some of the syntax-highlighting capabilities and subtleties in order to gain the specific results in the auto-completion suggestions. Knowing those tradeoffs, and understanding the cost (time and effort) involved in creating all those UDL and autocompletion files, any particular user could make the decision of which way to go for themselves.
Re^6: Which IDE's show tooltips for Perl builtins? (Generic Solutions)
by LanX (Saint) on Jul 27, 2022 at 14:34 UTC
    > My thinking was that each version of Perl might have its own file, such as perl5036.xml,

    These static files tend to age very badly and maintenance is no fun ° ...

    My idea - and I've discussed this recently with haj, who currently maintains cperl-mode - is to have CPAN-modules which return the necessary code intelligence.

    The IDE would just need to initialize at startup - best with caching - what it finds in @INC.

    If via LSP or a native API should be up to the IDE plugin maintainer.

    Like this switching between Perl versions would be easy, just install the necessary modules via cpanm.

    I'm just in the process to write such a module using core modules. And attempt to build a proof of concept with emacs and a web demo in JS.

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

    °) e.g. emacs has built in GNU info browser, and cperl-mode offers to browse Perl docs via info, but the last available info file for download was for v5.08 IIRC.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11145782]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2024-04-19 04:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found