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

Feature request: eldoc for datomic query input parameters #1832

Closed
mallt opened this issue Aug 26, 2016 · 3 comments
Closed

Feature request: eldoc for datomic query input parameters #1832

mallt opened this issue Aug 26, 2016 · 3 comments

Comments

@mallt
Copy link
Contributor

mallt commented Aug 26, 2016

I guess this request might be too specific, but I think it would be useful if there would be eldoc support for datomic query input parameters.

For example in the following query, the :in keyword specifies the list of input parameters:
datomic_query_example
so I guess it should be possible to use them in the eldoc info.

I'm not sure how this should be implemented, but if someone could give directions on how to do it, I would gladly give it a try.

Thanks a lot!

@bbatsov
Copy link
Member

bbatsov commented Aug 27, 2016

How do you imagine resulting eldoc for this query? I have never used datomic, so I'm not sure what exactly are we aiming for here.

@mallt
Copy link
Contributor Author

mallt commented Aug 27, 2016

The q function of datomic expects a query and the inputs of the query. This is the current eldoc info:
datomic_q_eldoc

By examining the :in keyword of the query, the eldoc for the example query above could then become:
datomic_q_eldoc_vars

@Malabarba
Copy link
Member

I could see this as part of a larger feature. For instance, in macros
with a rich structure (like letfn or defrecord) when the cursor is
deep inside the macro, eldoc could tell you that here you should be
typing a function/method name, or here you should be typing an
arglist.

Then the same could apply to datomic queries, which follow a similar logic.

The problem, as usual, is implementing. Even in this generalized form, the feature has fairly limited application, and would require quite a bit more effort than the current eldoc.

mallt added a commit to mallt/cider that referenced this issue Mar 12, 2017
mallt added a commit to mallt/cider that referenced this issue Mar 12, 2017
mallt added a commit to mallt/cider that referenced this issue Mar 19, 2017
mallt added a commit to mallt/cider that referenced this issue Mar 22, 2017
mallt added a commit to mallt/cider that referenced this issue Mar 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants