Skip to content
This repository was archived by the owner on Sep 21, 2019. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .drone.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
build:
pipeline:
quality:
image: ensime/ensime:v1.x-cache
pull: true
Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Ensime for vim `ensime-vim`
# `ensime-vim` – Scala IDE features for Vim!

[![Join the chat at https://gitter.im/ensime/ensime-vim](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/ensime/ensime-vim?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Build Status](http://fommil.com/api/badges/ensime/ensime-vim/status.svg)](http://fommil.com/ensime/ensime-vim)
[![Coverage Status](https://coveralls.io/repos/yazgoo/ensime-vim/badge.svg?branch=master&service=github)](https://coveralls.io/github/yazgoo/ensime-vim?branch=master)
[![Build Status](https://ci.fommil.com/api/badges/ensime/ensime-vim/status.svg)](https://ci.fommil.com/ensime/ensime-vim)

Documentation is available at [ensime.org](https://ensime.github.io/editors/vim/)
Documentation is available at [ensime.org](http://ensime.org/editors/vim/).
1 change: 0 additions & 1 deletion ensime_shared/ensime.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ def _create_ticker(self):
if not self._ticker:
self._ticker = Ticker(self._vim)


def disable_plugin(self):
"""Disable ensime-vim, in the event of an error we can't usefully
recover from.
Expand Down
7 changes: 4 additions & 3 deletions ensime_shared/launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,28 +150,29 @@ def _start_process(self, classpath):
Args:
classpath (list of str): list of paths to jars or directories
(Within this function the list is joined with a system dependent
path separator to create a single string argument to suitable to
path separator to create a single string argument suitable to
pass to ``java -cp`` as a classpath)

Returns:
EnsimeProcess: A process handle for the launched server.
"""
cache_dir = self.config['cache-dir']
java_flags = self.config['java-flags']
iswindows = os.name == 'nt'

Util.mkdir_p(cache_dir)
log_path = os.path.join(cache_dir, "server.log")
log = open(log_path, "w")
null = open(os.devnull, "r")
java = os.path.join(self.config['java-home'], 'bin', 'java' if os.name != 'nt' else 'java.exe')
java = os.path.join(self.config['java-home'], 'bin', 'java.exe' if iswindows else 'java')

if not os.path.exists(java):
raise InvalidJavaPathError(errno.ENOENT, 'No such file or directory', java)
elif not os.access(java, os.X_OK):
raise InvalidJavaPathError(errno.EACCES, 'Permission denied', java)

args = (
[java, "-cp", (':' if os.name != 'nt' else ';').join(classpath)] +
[java, "-cp", (';' if iswindows else ':').join(classpath)] +
[a for a in java_flags if a] +
["-Densime.config={}".format(self.config.filepath),
"org.ensime.server.Server"])
Expand Down
1 change: 1 addition & 0 deletions ensime_shared/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def extract_package_name(lines):
break
return package


@contextmanager
def catch(exception, handler=lambda e: None):
"""If exception runs handler."""
Expand Down
1 change: 1 addition & 0 deletions rplugin/python/ensime.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import neovim


def ensime_init_path():
path = os.path.abspath(inspect.getfile(inspect.currentframe()))
expected_nvim_path_end = os.path.join('rplugin', 'python', 'ensime.py')
Expand Down