-
-
Notifications
You must be signed in to change notification settings - Fork 646
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
Completion candidates for cider-find-resource #1062
Comments
Yeah, that'd be great. We'll need middleware support for this. |
@alexander-yakushev maybe it makes sense to have some completion for resource names in compliment as well. Those can be triggered only in certain functions (e.g. |
Why not. There can be a source for that, that will work in |
@expez Do you know how to get a list of available resources? |
@alexander-yakushev I just started using clojure.java.classpath in In general it's not possible to get a complete listing of everything on the classpath, you can only get resources by name or traverse it yourself (which might be real slow if there's a ton of stuff on cp). After obtaining the content on classpath the simplest thing to do is:
This should give you everything you want, but also quite a bit of stuff nobody cares about in this context (e.g. the source files for the project and I think To narrow the field further I think you have to consult |
@expez Thank you, I will try it out. |
OK, done and done in There is also I wrote tests, but I can't test the client side, AC does't want to complete from a string, even though I did |
Hot damn, that was quick! I can't see the code in the |
Pushed. Also, @bbatsov and me decided in alexander-yakushev/compliment#24 to complete only resources that belong to the current project. Otherwise, classpath contains a lot of stuff even after you filter out classes and source files. Java jars themselves have plenty of images and other resources. If you have better ideas how to include more resources but omit the cruft, please share. |
And sorry, I forgot to require the source, so it probably is not initialized. I redeployed 0.2.2-SNAPSHOT, please delete the old one and retry. |
If #1060 is tackled and #1059 is tackled we should also update
cider-find-resource
to give a completing read of all available resources, withthing-at-point
providing a default for the jump.The text was updated successfully, but these errors were encountered: