company-mode completion back-end for Perl using PlSense.
You can install this package from Melpa
M-x package-install RET company-plsense RET
once installed add the following to your .emacs
(add-to-list 'company-backends 'company-plsense)
(add-hook 'perl-mode-hook 'company-mode)
(add-hook 'cperl-mode-hook 'company-mode)
- variables
- Methods
- Modules
- Class Initializers
- LIST of Use/Require statements
- Key of Hashes
company-plsense-executable
: location of PlSense executable
company-plsense-config-path
: location of .plsense
config file
company-plsense-ignore-compile-errors
: ignore PlSense errors related to compiling an imported module.
PlSense does not currently analyze use lib
statements so all libraries must
be locatable in either @INC
or $PERL5LIB
. If you have a project specific
library use PlSense's ProjectInfoFile.
- Run
company-plsense-executable-version
to verify Emacs can find the executable. - The command
company-plsense-server-status
will show the current status of the servers. In order to work, all three servers (Main, Work, and Resolve) need to be running. If not, start the server withcompany-plsense-start-server
. - If all the servers are running but completion candidates are still not being
generated, use the command
company-plsense-buffer-ready
. If the buffer failed to compile cleanly it will return "Not Found", in which case you will need to runperl -c
on the file to see what the problem is. If the reply is "Yes" that means the file loaded properly. - If
company-plsense
is still not working, open an issue in the issue tracker.
PlSense only supports Perl5.
company-plsense
can only provide completion candidates for buffers tied to files.
PlSense
cannot analyze files that do not compile cleanly. To verify if a file is
free of errors, run perl -c /path/to/file
or use a linter such as flycheck.