tonsky / Clojure-Sublimed

Clojure support for Sublime Text 4
MIT License
371 stars 22 forks source link

Recommended set up to make static analysis autocomplete work? #40

Closed darthbeeius closed 1 year ago

darthbeeius commented 2 years ago

" 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.

tonsky commented 2 years ago

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

darthbeeius commented 2 years ago

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/"

jaihindhreddy commented 2 years ago

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?

kyleerhabor commented 2 years ago

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?

tonsky commented 2 years ago

Thanks, added