-
Notifications
You must be signed in to change notification settings - Fork 10
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 spec registry candidates #26
Comments
Yeah, that'd be cool. @alexander-yakushev Is there some special support for specs in |
Nothing yet, however, it is a good idea to add something for Spec. This will also require some long-due Compliment refactoring. I will think about it. |
Any new development on this one, I would be in favor of following @alexander-yakushev guidance on this, the code above works in lumo but the keyword match there is based on regex and sometimes faulty. |
Sorry, could you give me some more context again? Are we discussing adding Spec support to Compliment, or to cljs-tooling? If it's the latter, I'm not much of an input here:). If it's the former, I wonder which support exactly you are looking for. Compliment already completes keywords, that works for specs too, however doesn't say it's a spec. Is this what you meant? |
I guess that is the first step towards that, and if you do it I will follow the same approach so that it is uniform and implement it in |
Got you. So, what particularly do you have in mind beyond trivial keyword completion? |
didn't think this through too much but for starters if the keyword is a spec, we could fetch the definition and show it in eldoc. |
That's not something Compliment can currently do (the eldoc part). It can only offer completion candidates, and also provide documentation for each candidate (but I don't think CIDER uses the documentation part anymore). I could perhaps add this possibility if it's easier for CIDER to get it from Compliment. @bbatsov ? |
Yep the eldoc would be another thing we would do from cider but we need to know from Compliment that a keyword is a spec and if Compliment has some info from the spec registry that could go in the |
Another very useful idea would be to get the whole spec tree given one - aka recurse the spec tree with something like: (defn nested-specs
[spec]
(reduce-all-specs (s/form spec))) |
Yeah, CIDER doesn't use it. It used it a while ago, but then we've implemented a more flexible |
Like in
lumo
for a start: https://github.com/anmonteiro/lumo/blob/master/src/cljs/snapshot/lumo/repl.cljs#L1240If I remember correctly there was a problem with that implementation, still a good start.
The text was updated successfully, but these errors were encountered: