-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide Hover Documentation For Perl's Inbuilts #143
Comments
Sure, this feature would be great, thanks! It would also be nice to be able to autocomplete on inbuilts similar to how the current auto-completion + docs work now. For this to work, we would need to know in advance the set of inbuilts to add them to a list in advance. I like the idea of parsing them once to avoid speed penalties. This line of code will give you the location of perlfunc.pod in perl: The Perl Navigator already runs ModHunter.pl on startup to get locations of installed modules. It could be modified to get locations of documentation as well and evolve into a generic start-up script. An additional one we would want is I'll take a closer look at #142 this week as well. Thanks again for your help so far on this project. |
Ah, this is great, actually! I like this approach a lot. I also agree that
That's great, thanks! Whenever you got time. |
Basically what the title says.
At least in my case (Neovim 0.10.1) there's no hover documentation for inbuilts like
die
,warn
,shift
,push
, etc. - basically all inbuilts, as far as I'm aware.Would be cool if it was possible to look those docs up somehow.
Depending on how PR #142 evolves, this should be fairly straightforward to implement. Luckily, the official docs provide sources for the docs themselves -- and they just happen to be written in POD, who would've thought? ;) For example, the source for perlfunc is perlfunc.txt.
One possible solution would be to "vendor" these
.txt
files together with the server and parse them intoPodDocuments
(see PR #142) during startup, so that they don't need to be re-parsed on everytextDocument/hover
event.Then, when a symbol's name isn't found in the POD of the current file, fall back to the POD docs of the inbuild Perl stuff and try to find it in there.
Having the lookup of inbuilts be a "fallback" mechanism would also be compatible with e.g.
WWW::Mechanize
, which provides its owndie
andwarn
subs. That way those would still be found before the inbuiltdie
andwarn
functions.Once PR #142 is resolved, I'll happily tackle this too.
The text was updated successfully, but these errors were encountered: