Clojure-Sublimed icon indicating copy to clipboard operation
Clojure-Sublimed copied to clipboard

Recommended set up to make static analysis autocomplete work?

Open darthbeeius opened this issue 3 years ago • 5 comments

" Autocomplete. Static analysis is much simpler and much more reliable than requiring an always-live connection to the working app."

What sublime package provides autocomplete for Clojure. Have been searching for something and have not been able to find anything.

Open to suggestions/recommendations.

darthbeeius avatar Dec 12 '21 08:12 darthbeeius

I think Sublime Text itself tries to do that, no? Not always successfully, but to some extent

tonsky avatar Dec 13 '21 15:12 tonsky

I was looking for semthing more on the lines of getting suggestions for all the functions from clojure.core.

For example, to get reduce as autocomplete option when I type "red". Or getting function suggestion when I type "Integer/"

darthbeeius avatar Dec 13 '21 21:12 darthbeeius

I think Sublime Text itself tries to do that, no? Not always successfully, but to some extent

True. But the default completions are based on all the words already present in the window.

For example, if I've never used clojure.string/includes? in my codebase, I'd still like to get that autocomplete when I type str/, given that [clojure.string :as str] is required by my namespace.

Perhaps this is out-of-scope for this Sublime Plugin, but the fact that the README says "Static analysis is much simpler and much more reliable", users may be under the misconception that such a plugin already exists. I couldn't find such a static-analysis based completion plugin for Sublime Text. The closest such thing I found was anakondo an emacs minor-mode. Perhaps I'm missing something?

jaihindhreddy avatar Dec 14 '21 10:12 jaihindhreddy

There are some ways to achieve autocompletion, such as Sublime LSP with Clojure LSP or SublimeLinter with clj-kondo. Maybe this could be mentioned in the readme @tonsky?

kyleerhabor avatar Jun 07 '22 18:06 kyleerhabor

Thanks, added

tonsky avatar Jun 08 '22 18:06 tonsky