{"id":15975840,"url":"https://github.com/alexandrecarlton/eclim-docker","last_synced_at":"2026-05-10T19:17:02.984Z","repository":{"id":147202734,"uuid":"117973621","full_name":"AlexandreCarlton/eclim-docker","owner":"AlexandreCarlton","description":"A dockerised eclim","archived":false,"fork":false,"pushed_at":"2018-01-19T02:22:45.000Z","size":21,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-10T02:28:32.221Z","etag":null,"topics":["docker","eclim","eclipse","vim"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AlexandreCarlton.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-18T11:23:21.000Z","updated_at":"2019-01-11T20:56:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"37492ef1-8bd7-457c-b58e-4b431fc15fa1","html_url":"https://github.com/AlexandreCarlton/eclim-docker","commit_stats":{"total_commits":7,"total_committers":1,"mean_commits":7.0,"dds":0.0,"last_synced_commit":"af6479697d1fdcf5eef093a1570feb72873705ba"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexandreCarlton%2Feclim-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexandreCarlton%2Feclim-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexandreCarlton%2Feclim-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexandreCarlton%2Feclim-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlexandreCarlton","download_url":"https://codeload.github.com/AlexandreCarlton/eclim-docker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247217221,"owners_count":20903009,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","eclim","eclipse","vim"],"created_at":"2024-10-07T22:05:26.762Z","updated_at":"2026-05-10T19:17:02.946Z","avatar_url":"https://github.com/AlexandreCarlton.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# eclim-docker\n\n[![Build Status](https://travis-ci.org/AlexandreCarlton/eclim-docker.svg?branch=master)](https://travis-ci.org/AlexandreCarlton/eclim-docker)\n\nA containerised [`eclim`](http://eclim.org), affording us Java completion in Vim\nwithout having to install [`eclipse`](https://www.eclipse.org/) or [`eclim`](http://eclim.org).\n\n# Motivation\n\nWhile [`YouCompleteMe`](https://github.com/Valloric/YouCompleteMe) (a popular\nVim plugin) provides completion for many languages, it does not provide any for\nJava (unless `eclim` is installed).\n\nRather than having to install `eclipse` and `eclim` manually, we can instead\ncopy across a few scripts, tweak our `.vimrc` and be ready to go.\n\n# Implementation\n\n## Docker\n\nThe [Dockerfile](Dockerfile) provided builds `eclim` using the Java variant of\n`eclipse`.\nSince `eclim` requires access to multiple folders (including our workspace,\nwhich can be customised), a helper script [`eclimd`](eclimd) has been provided\nto launch the instance for us.\nUnlike [`YouCompleteMe`](https://github.com/Valloric/YouCompleteMe), this\nserver is only launched once, albeit manually:\n\n```bash\n$ ./eclimd [--debug]\n```\n\nThis helper script will read the values provided in [`~/.eclimrc`](.eclimrc),\nwhich must also be copied into our home directory:\n\n```bash\n$ cp .eclimrc ~/.eclimrc\n```\n\nFinally, we need a way for our vim instance to communicate with the server\n(which relies on an executable provided only by `eclim`).\nThe docker image build process modifies the vim function used to get the\n`eclim` command by allowing the user to set the `g:EclimCommand` variable:\n\n```vim\nfunction! eclim#client#nailgun#GetEclimCommand(home)\n  \" let command = a:home . 'bin/eclim'\n  let command = get(g:, 'EclimCommand', a:home . 'bin/eclim')\n  \" ...\nendfunction\n```\n\n# Vim\nOf course, we need some way to interact with the server from within Vim.\n\n`eclim` provides a set of `*.vim` files so that we can communicate with Vim.\nHowever, these are only bundled in one place after we have run the `eclim`\ninstaller, so we cannot clone the repository via our favourite plugin manager.\n\nInstead, we copy the bundled files from our docker container into a directory\nthat can be loaded by our vim instance:\n\n```bash\n$ docker cp eclim:/usr/share/vim/vimfiles/eclim ~/.vim/plugged/eclim\n```\n\nWe must also have `vim` register this using a plugin manager (in this case,\n[`vim-plug`](https://github.com/junegunn/vim-plug)):\n\n```vim\ncall plug#begin('~/.vim/plugged')\n\" ...\nPlug 'ervandew/eclim', { 'frozen': 1, 'for': 'java' }\nlet g:EclimCompletionMethod = 'omnifunc'\nlet g:EclimCommand = '/path/to/eclim'\n\" ...\ncall plug#end()\n```\n\nWe set `frozen` so that we do not try to update this plugin (since we manage\nthis manually).\n\nFinally, we must set the `g:EclimCommand` to the full path of the\n[`eclim`](eclim) wrapper script.\nThis affords us access to the client executable we use to interact with our\n`eclimd` server.\n\n# Upgrading\n\nWhenever a new version is released, we must adjust the `ECLIM_VERSION`\nvariables provided in the [`eclimd`](eclimd), [`eclim`](eclim) and\n[`Makefile`](Makefile) files.\n\nOnce we have restarted the `eclimd` container, we must replace the files we\ncopied across into our bundled folder:\n\n```bash\n$ rm -rf ~/.vim/plugged/eclim\n$ docker cp eclim:/usr/share/vim/vimfiles/eclim ~/.vim/plugged/eclim\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexandrecarlton%2Feclim-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexandrecarlton%2Feclim-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexandrecarlton%2Feclim-docker/lists"}