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

Auto import from fully qualified namespaced keywords #3003

Open
wilkerlucio opened this issue Jan 8, 2025 · 0 comments
Open

Auto import from fully qualified namespaced keywords #3003

wilkerlucio opened this issue Jan 8, 2025 · 0 comments

Comments

@wilkerlucio
Copy link

wilkerlucio commented Jan 8, 2025

Hello, Cursive currently does auto-import from symbols, for example:

Given I have used [com.wsscode.pathom3.connect.planner :as pcp] in the project, if I type pcp/ in a new namespace, I start getting completions for the symbols, and in return, it adds the require with the alias.

I would like to have the same functionality for fully qualified keyword aliases. Using the same example, I would like that when I type ::pcp/ I start getting completions for the com.wsscode.pathom3.connect.planner namespace keywords and auto-import on return.

For the auto-import of keywords, ideally, it would import using :as-alias. This can enable nicer flows that use fully qualified keywords to be imported. But there is a caveat here; there is if later I decide to use pcp/, then that :as-alias would have to turn into :as. This could even be a separate feature that auto-promotes :as-alias to :as when a symbol is used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant