You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When autocompleting a function from a namespace that is required using (require ...) the namespace is added in the (:require ...) list of the ns form. This happens even when the function is autocompleted from with in a Rich (comment ...) form.
I think that the ”correct” behaviour here is that clojure-lsp sees that the namespace is already required, and does not automatically add it to the ns form. Might be a good quick-fix suggestion to move the require to there, though?
Screenshots
adding-require.mp4
User details (please complete the following information):
Describe the bug
When autocompleting a function from a namespace that is required using
(require ...)
the namespace is added in the(:require ...)
list of thens
form. This happens even when the function is autocompleted from with in a Rich(comment ...)
form.To Reproduce
From @seancorfield
The ns insert occurs when I accept an auto-complete suggestion from the newly-aliased ns. Here's the before code:
Then I start to add a call:
and at this point it suggests all the functions in that ns so I press tab to select the first one and get this:
Expected behavior
I think that the ”correct” behaviour here is that clojure-lsp sees that the namespace is already required, and does not automatically add it to the
ns
form. Might be a good quick-fix suggestion to move the require to there, though?Screenshots
adding-require.mp4
User details (please complete the following information):
Additional context
Slack thread with discussion: https://clojurians.slack.com/archives/CPABC1H61/p1664877429715259
The text was updated successfully, but these errors were encountered: