Open VVelox opened 6 years ago
Hmm.... just noticed it throwing this message...
Argument "__Positional_0001" isn t numeric in postincrement (++) at /usr/local/lib/perl5/site_perl/Class/Std/Storable.pm line 51.
I am using Storable.pm v2.27. maybe your version is really old/new?
plsense -i
, which should start an interactive PlSense session.> serverstart
> serverstatus
it should show all servers running.> open /path/to/test/file
> ready /path/to/test/file
. If
everything went well it should reply Yes
.> assist $foo
. If
your file has a variable called $foo_bar
you should see that suggestion in
the reply.> serverstop
and > exit
.company-mode
is t
to confirm company is enabled*messages*
buffer and see if "Starting plsense server..." is loggedcompany-backends
and verify that company-plsense
is one of the first in the list. (that variable has a long doc string so it will be near the bottom)company-plsense-status
to see the state of the running sever. All should be runningdescrible-variable
on the after-save-hook
and you should see company-plsense-update
If all the above working you should be good to go. If one of the steps above fails, report back here.
Also note that you can start the plsense server outside of Emacs using the numerical steps above then Emacs will connect to it when ever it starts up. Really useful if you close Emacs often.
Installed Storable as that was missing.
Hmm... (add-to-list 'company-backends 'company-plsense) I found that if I manually start it and put it in the heap via going to the config group for it and adding company-plsense it will say it is using it when I check company-diag, but it behaves just as I was before with out it.
Seems to result in this according to --debug-init...
Debugger entered--Lisp error: (void-variable company-backends) (member (quote company-plsense) company-backends) (if (member (quote company-plsense) company-backends) company-backends (setq company-backends (cons (quote company-plsense) company-backends))) eval-buffer(#<buffer load> nil "/home/kitsune/.emacs.d/init.el" nil t) ; Reading at buffer position 3022 load-with-code-conversion("/home/kitsune/.emacs.d/init.el" "/home/kitsune/.emacs.d/init.el" t t) load("/home/kitsune/.emacs.d/init" t t)
your pastbin link is not working, but it sounds like you need to add (require 'company)
so that the variables will be loaded by the time you add it to the list.
(require 'company) fixes it starting and the buffer ready bit returns yes now. Does not appear to do anything more useful still than regular company-mode.
Strange the pastebin link is not working. Just threw it on my web server(not sure why I did not do that in the first place now).
Can you confirm that company-plsense
is first in the list of company-backends
? Also use company-diag
to verify that it is using company-plsense
as the backend.
On a seperate note, you shouldn’t need to define the checker for perlcritic
in flycheck. That is included in the package.
hmm.... just noticed something interesting this time starting it it said...
ERROR: Can't connect work server : Connection refused
I am seeing the three procs below running...
PID User CPU% Mem% VM Size RSS Info Nice Start Time Command
90539 kitsune 0.00 0.19 36396 30968 S+ accept 5 14:34 0 /usr/local/bin/perl /usr/local/bin/plsense-server-resolve --cachedir /home/kitsune/.plsense.d --port1 33333 --port2 33334 --por
90528 kitsune 0.00 0.18 34348 30808 S+ accept 5 14:34 0 /usr/local/bin/perl /usr/local/bin/plsense-server-main --cachedir /home/kitsune/.plsense.d --port1 33333 --port2 33334 --port3
90530 kitsune 0.00 0.12 23860 19784 S+ accept 5 14:34 0 /usr/local/bin/perl /usr/local/bin/plsense-server-work --cachedir /home/kitsune/.plsense.d --port1 33333 --port2 33334 --port3
90502 kitsune 0.00 0.08 17584 13380 Ss+ ttyin 5 14:34 0 /usr/local/bin/perl /usr/local/bin/plsense --interactive
Diags as below...
Emacs 25.3.1 (amd64-portbld-freebsd11.1) of 2017-09-29 on vixen42.vulpes.vvelox.net
Company 0.9.4
company-backends: (company-plsense php-extras-company company-bbdb company-nxml company-css company-eclim company-semantic company-clang company-xcode company-cmake company-capf company-files
(company-dabbrev-code company-gtags company-etags company-keywords)
company-oddmuse company-dabbrev)
Used backend: company-plsense
Major mode: perl-mode
Prefix: stop
Completions: none
Also even though it shows up with that company-plsense-server-status shows up as Running.
It also threw the item below a few times, before finally returning "Yes" for "company-plsense-buffer-ready".
Argument "__Positional_0001" isn t numeric in postincrement (++) at /usr/local/lib/perl5/site_perl/Class/Std/Storable.pm line 51.
What is the output of company-plsense-status
? I have never seen the storable error before. Can you confirm that the server is working using the steps I outlined above?
The output from company-plsense-status is...
Main Server is Running.
Work Server is Running.
Resolve Server is Running.
If the server is running, call company-plsense-update
to make sure the location is on the file you want (Though normally it will do that automatically). Then run company-plsense-command
and enter the command location
to confirm it is on the file you want. If that is the case try company-plsense-command
and run assist <some partially completed variable name. e.g. $foo>
. It should reply back with all variables that begin with that prefix ($foo
in this case). If so you should be good to go.
So I generally have to kick start it via M-x company-mode-plsense-setup and then run M-x company-plsense-start-server. This will likely get everything up and running to the point that M-x company-plsense-buffer-ready fails... at which point rerunning M-x company-mode-plsense-setup fixes that.
Atleast that was what was happening. Been poking my init.el a bit. It starts after loading a Perl file after a few seconds. The buffer says it is ready. Nothing seems different than before with out.
https://www.pastebin.ca/3952089 is my current config.
On another note, what is company-doc-buffer? I just have company-show-doc-buffer, which does nothing of use. Just says it has nothing at this point.