def prepare_payload(self, *args): if len(args) == 0: ns = path_to_ns(self.nvim) if ns is None: warning( "Unable to require: couldn't find namespace from path.") return None else: ns = " ".join(args) return {"code": "(require '[{}] :reload)".format(ns)}
def gather_candidates(self, keyword): if not loaded: return [] address = localhost(self._vim) if address is None: return [] url = "nrepl://{}:{}".format(*address) wc = self.get_wc(url) session = self.get_session(url, wc) ns = path_to_ns(self._vim) def global_watch(cmsg, cwc, ckey): self._logger.debug("Received message for {}".format(url)) self._logger.debug(cmsg) wc.watch('global_watch', {}, global_watch) return cider_gather(self._logger, Acid_nrepl(wc), keyword, session, ns)
def prepare_payload(self, data): return {"symbol": data, "ns": path_to_ns(self.nvim)}
def acid_require(self): data = "(require '[{} :refer :all])".format(path_to_ns(self.nvim)) self.eval({"code": data}, "Ignore")