Hey folks. I’m using LSP with eglot
in Emacs. Unless the point is not exactly at point, code actions don’t present the option to require ns. Is that expected? Does that depend on the client? I recall that lsp-mode
offered the option for requiring ns regardless of the position of the point, as long as it was in the same line as the symbol that uses the missing ns.
https://github.com/clojure-lsp/clojure-lsp/blob/master/src/clojure_lsp/feature/code_actions.clj#L37and https://github.com/clojure-lsp/clojure-lsp/blob/master/src/clojure_lsp/feature/code_actions.clj#L177-L178 are the code where clojure-lsp use the range from the diagnostic to return the code action to the client, the client will send this :data
field when user choose the code action, so I'm not sure the issue here is with the client since the server send the :data
basically, the data field is a generic field that server can return and when client choose a code action, it sends the same data
where you can see it's resolved/retrieved https://github.com/clojure-lsp/clojure-lsp/blob/master/src/clojure_lsp/feature/code_actions.clj#L87-L92