Skip to content
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

Code Action "Add require" for namespaced keywords #1777

Open
NoahTheDuke opened this issue Feb 28, 2024 · 1 comment · May be fixed by #1793
Open

Code Action "Add require" for namespaced keywords #1777

NoahTheDuke opened this issue Feb 28, 2024 · 1 comment · May be fixed by #1793
Labels
enhancement New feature or request good first issue Good for newcomers
Projects

Comments

@NoahTheDuke
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Currently, if you type in some-alias/some-var and then make a textDocument/codeAction request on the symbol, clojure-lsp will return a suggestion to "Add require '[long.name.example :as some-alias]". However, if you type in ::some-alias/some-keyword and then make a textDocument/codeAction request on the keyword, clojure-lsp will not return a "Add require ..." suggestion.

Describe the solution you'd like
Return two additional suggestions to the current set:

1. Add require '[long.name.example :as some-alias]
2. Add require '[long.name.example :as-alias some-alias]

Describe alternatives you've considered

  1. Do nothing.
  2. Delete the leading colons and then call codeAction and add the alias and then add the two colons back in.

Additional context

N/A

@NoahTheDuke NoahTheDuke added the enhancement New feature or request label Feb 28, 2024
@ericdallo ericdallo added this to Low priority in clojure-lsp via automation Mar 3, 2024
@ericdallo ericdallo added the good first issue Good for newcomers label Mar 3, 2024
@U-C-S
Copy link

U-C-S commented Mar 12, 2024

I am willing to work on a PR for this....

@U-C-S U-C-S linked a pull request Mar 16, 2024 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
clojure-lsp
Low priority
Development

Successfully merging a pull request may close this issue.

3 participants