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

Add the ability to 'define' keywords #1549

Closed
danielcompton opened this issue Oct 4, 2016 · 3 comments
Closed

Add the ability to 'define' keywords #1549

danielcompton opened this issue Oct 4, 2016 · 3 comments
Milestone

Comments

@danielcompton
Copy link
Collaborator

danielcompton commented Oct 4, 2016

Here are two use cases where it would be helpful to be able to 'define' a keyword and navigate to where it was 'defined':

  1. specs: s/def and friends
  2. re-frame: In re-frame you register effects and subscriptions to keywords (e.g. :app/do-something).
(reg-event-fx
  :app/do-something
  (fn [{:keys [db]} [_ val]]
    (do something)
    ))

When navigating through re-frame code, we often want to navigate to where this keyword was registered. Find usages works, but shows you all usages of the keyword, not where it was registered. I imagine spec will have the same issues?

@superstructor
Copy link

This would be a great feature to have. Interested to know how Cursive will tell the difference between the definition (reg-event-fx :app/do-something ... and the usage (dispatch [:app/do-something]) where :app/ is a synthetic namespace ?

@souenzzo
Copy link

IMHO it should be an knowledge about re-frame/spec code...
Maybe "Case contains re-frame.core on imported namespaces, than keys after reg-event-fx are definitions" or something like...

@cursive-ide
Copy link
Owner

This is fixed in the next build in #1470.

@cursive-ide cursive-ide added this to the 1.6.2-eap2 milestone Oct 18, 2017
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

4 participants