From 844b999faeb10dfdecb3f786aa4db90d8e666ae3 Mon Sep 17 00:00:00 2001 From: Ches Martin Date: Tue, 3 Jan 2017 09:35:47 +0700 Subject: [PATCH 1/2] Update CI config for new Drone setup --- .drone.yml | 2 +- README.md | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.drone.yml b/.drone.yml index 83030b7..9c08b80 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,4 +1,4 @@ -build: +pipeline: quality: image: ensime/ensime:v1.x-cache pull: true diff --git a/README.md b/README.md index a392e63..2a077fd 100644 --- a/README.md +++ b/README.md @@ -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/). From 610e5990f1ebcd84134d494500eb4c5bdc72d303 Mon Sep 17 00:00:00 2001 From: Ches Martin Date: Sat, 26 Aug 2017 20:12:09 +0700 Subject: [PATCH 2/2] Fix lint problems failing the build --- ensime_shared/ensime.py | 1 - ensime_shared/launcher.py | 7 ++++--- ensime_shared/util.py | 1 + rplugin/python/ensime.py | 1 + 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ensime_shared/ensime.py b/ensime_shared/ensime.py index 2428708..31c0d6b 100644 --- a/ensime_shared/ensime.py +++ b/ensime_shared/ensime.py @@ -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. diff --git a/ensime_shared/launcher.py b/ensime_shared/launcher.py index 61ca4ec..209a407 100644 --- a/ensime_shared/launcher.py +++ b/ensime_shared/launcher.py @@ -150,7 +150,7 @@ 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: @@ -158,12 +158,13 @@ def _start_process(self, classpath): """ 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) @@ -171,7 +172,7 @@ def _start_process(self, classpath): 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"]) diff --git a/ensime_shared/util.py b/ensime_shared/util.py index 2660b6c..a2c4324 100644 --- a/ensime_shared/util.py +++ b/ensime_shared/util.py @@ -41,6 +41,7 @@ def extract_package_name(lines): break return package + @contextmanager def catch(exception, handler=lambda e: None): """If exception runs handler.""" diff --git a/rplugin/python/ensime.py b/rplugin/python/ensime.py index e6b65da..cce362d 100644 --- a/rplugin/python/ensime.py +++ b/rplugin/python/ensime.py @@ -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')