-
-
Notifications
You must be signed in to change notification settings - Fork 150
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
Namespace alias shadows local variables #1718
Comments
I tested with Emacs lsp-mode and it works, then I tested with calva and server correctly return the expected items in the correct order: 2023-11-03T16:55:59.247Z DEBUG [clojure-lsp.server:55] - [Trace - 2023-11-03T16:55:59.247Z] Sending response 'textDocument/completion - (69)'. Request took 37ms.
Result: [ {
"label" : "ns-alias",
"kind" : 6,
"data" : {
"unresolved" : [ [ "documentation", {
"name" : "ns-alias",
"uri" : "file:///home/greg/dev/clojure-lsp/lib/src/clojure_lsp/feature/issue/another_ns.clj",
"name-row" : 3,
"name-col" : 6
} ] ]
},
"score" : 14
}, {
"label" : "ns-alias",
"kind" : 10,
"detail" : "alias to: clojure-lsp.feature.issue.aliased",
"data" : {
"unresolved" : [ [ "alias", {
"ns-to-add" : "clojure-lsp.feature.issue.aliased",
"alias-to-add" : "ns-alias",
"uri" : "file:///home/greg/dev/clojure-lsp/lib/src/clojure_lsp/feature/issue/another_ns.clj"
} ] ]
},
"score" : 9
}, {
"label" : "ns-aliases",
"kind" : 3,
"detail" : "clojure.core/ns-aliases",
"data" : {
"unresolved" : [ [ "documentation", {
"uri" : "file:///clojure.core.clj",
"name" : "ns-aliases",
"ns" : "clojure.core"
} ] ]
},
"score" : 6
} ] Closing this as this should be fixed on calva or some LSP dependency |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug discussed here
https://clojurians.slack.com/archives/CBE668G4R/p1699023626527349
Describe the bug
I'm using Calva. If a namespace alias shares name with a variable, argument or local binding, the autocompletion will only show the namespace alias. Hitting tab will add the aliased namespace as a dependency to the ns.
To Reproduce
Expected behavior
In the cases above, the var, argument, and local binding, respectively, should be (1) suggested, and (2) the first suggestions in the autocompletion.
The Clojure LSP output below is for when I type
l
on the "LSP-OUTPUT" lineclojure-lsp output
User details (please complete the following information):
% clojure-lsp --version => zsh: command not found: clojure-lsp
The text was updated successfully, but these errors were encountered: