This unfinished Ansible role is a WIP, I'm not sure to complete one day (probably never). I publish it anyway because it could be a starting point to install Eclim.
- For now, this Ansible role depends on variables used in my VM playbook
- There are problems with Xvfb / Eclim daemon / Vim communication (see below)
- Eclipse installation
- Eclipse PHP plugin installation
- Eclim installation
- Xfvb daemon
- Eclim daemon
Work when loaded manually, but not properly when daemons are auto-loaded at VM boot: They need a few seconds before being usable. Especially the Eclim one which requires that Xvfb be ready. So, Eclim daemon launch the java process and not the VIm link (~/.eclim/eclim-instances
) + do not detect Xvfb RANDR extension.
I think the better way is to disable the startup auto-load (sudo update-rc.d eclim remove
) and restart the VM, or removing the last 2 tasks in install-daemon.yml. Then, play with them manually.
A few leads to debug:
- Kill java processes (
sudo pkill java
for example), orsudo kill -9 PID
(where PID is the correct process ID) - Stop Eclim daemon service (
sudo service eclim stop
) before to re-start it - Stop Eclim daemon by running
/opt/eclipse/eclim -command shutdown
- Check the status of Eclim:
/opt/eclipse/eclim -command ping
(shell) or:PingEclim
(VIm)
I've put some comments at the end of the taskfile, explaining how to test your installation.
- Eclim allows a faster autocompletion than my current configuration on big project, but sometimes VIm freezes.
- Eclim doesn't currently support the "jump to definition" feature for PHP (with
:PhpSearchContext
) - I had some bugs when complete variable names: The begin I typed disappears. I can deal with it, but it's boring.
- I tried this because completion with ctags was slow on huge projets, but I've moved to universal-ctags which is incredibly faster.