Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide or explain how to get completion in Clojure socket REPLs #111

Open
arichiardi opened this issue Oct 13, 2017 · 8 comments
Open

Provide or explain how to get completion in Clojure socket REPLs #111

arichiardi opened this issue Oct 13, 2017 · 8 comments

Comments

@arichiardi
Copy link
Contributor

arichiardi commented Oct 13, 2017

It looks like what inf-clojure currently uses for completions has been abandoned (aka feature complete?).

Cider uses the wonderful https://github.com/alexander-yakushev/compliment and we probably should as well. It gives you more completion power as well because it accepts a context in input, which it then uses to complete locals, for instance.

It also returns more metadata together with the actual completion and we could feed that to company-mode.

@bbatsov
Copy link
Member

bbatsov commented Oct 14, 2017

That's because REPLy uses the old completion library internally and it's always available to users of boot and leiningen (which use REPLy). The only real fix for this is to finish somehow trptcolin/reply#153

@arichiardi
Copy link
Contributor Author

I see, I opened this because I had some exception and I basically realized that according to your message I don't have any completion in boot when using a socket repl. That's where the exception comes from.

@arichiardi arichiardi changed the title Use compliment for Clojure REPL completions Provide or explain how to get completion in Clojure socket REPLs Dec 31, 2017
@bbatsov
Copy link
Member

bbatsov commented Dec 31, 2017

When you can easily add a check for the presence of compliment and use different completion commands for it. That'd be simple approach to solve this problem.

@arichiardi
Copy link
Contributor Author

Compliment sends back edn. So I am thinking we could have a var containing a function which is called with whatever the completion command returns. This function would be user provided (with a default), to that the passing of the compliment's edn can be done (potentially using parseclj.

@arichiardi
Copy link
Contributor Author

Or a different module inf-clojure-company can provide this function for company-mode for instance.

@bbatsov
Copy link
Member

bbatsov commented Jan 1, 2018

Compliment sends back edn. So I am thinking we could have a var containing a function which is called with whatever the completion command returns. This function would be user provided (with a default), to that the passing of the compliment's edn can be done (potentially using parseclj.

Yeah, that sounds like a good approach to me. edn.el (https://github.com/expez/edn.el) can also be used (at least temporary, until parseclj gets a stable release).

@arichiardi
Copy link
Contributor Author

I am working on a solution for this, it will require compliment on the classpath.

arichiardi added a commit to arichiardi/inf-clojure that referenced this issue Jan 5, 2018
Given compliment on the classpath, the inf-clojure-compliment can be required
in order to customize the right defcustoms that are necessary for it.
Completions are only annotated and in order to customize this process an
inf-clojure hacker can use inf-clojure-completions-annotation-fn.
arichiardi added a commit to arichiardi/inf-clojure that referenced this issue Jan 9, 2018
Given compliment on the classpath, the inf-clojure-compliment can be required
in order to customize the right defcustoms that are necessary for it.
Completions are only annotated and in order to customize this process an
inf-clojure hacker can use inf-clojure-completions-annotation-fn.
arichiardi added a commit to arichiardi/inf-clojure that referenced this issue Jan 11, 2018
Given compliment on the classpath, the inf-clojure-compliment can be required
in order to customize the right defcustoms that are necessary for it.
Completions are only annotated and in order to customize this process an
inf-clojure hacker can use inf-clojure-completions-annotation-fn.
@MalloZup
Copy link

MalloZup commented Aug 5, 2019

autogenerated with https://github.com/MalloZup/doghub: issue inactive since 450 days. Please update the issue or close it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants