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

Resource completion #24

Closed
bbatsov opened this issue Apr 19, 2015 · 16 comments
Closed

Resource completion #24

bbatsov opened this issue Apr 19, 2015 · 16 comments

Comments

@bbatsov
Copy link
Collaborator

bbatsov commented Apr 19, 2015

It'd be nice if there was a source for resource completions. Those completions should be contextual - e.g. triggered only in functions known to accept resource paths.

We can also reuse this functionality to implement find resource functionality in CIDER.

Related ticket clojure-emacs/cider#1062

@alexander-yakushev
Copy link
Owner

Can you give more details what should that be? Should it complete paths inside strings or what exactly?

@bbatsov
Copy link
Collaborator Author

bbatsov commented Apr 19, 2015

Yeah, my idea was it should complete paths in strings. Imagine:

(resource "prefix|")

You'd get all the resource names starting with prefix.

@alexander-yakushev
Copy link
Owner

Should it complete one directory at a time (like hippie-expand does), or the candidates should be full resource names right from the beginning?

@bbatsov
Copy link
Collaborator Author

bbatsov commented Apr 19, 2015

Hmm, I was thinking about full resource paths (as it's easier to reuse those in ido).

@alexander-yakushev
Copy link
Owner

Wait, is there even a way to get all resources in a classloader? The answers I found so far are very contrived.

@bbatsov
Copy link
Collaborator Author

bbatsov commented Apr 19, 2015

No idea. Haven't really research the matter - I just assumed something like this should be possible.

@bbatsov
Copy link
Collaborator Author

bbatsov commented Apr 20, 2015

Another concern is do we want to show all resources (e.g. in jars), or just the ones that are actually in the current project.

@alexander-yakushev
Copy link
Owner

It it. There seem to be a lot of resources in Java itself, don't know how useful are those.

@bbatsov
Copy link
Collaborator Author

bbatsov commented Apr 20, 2015

Ok, let's just show the ones in the project.

@alexander-yakushev
Copy link
Owner

One more thing: by default AC does not initiate completion if it is started inside a string. What about company-mode?

@bbatsov
Copy link
Collaborator Author

bbatsov commented Apr 20, 2015

company-mode does completions inside strings out of the box.

On 20 April 2015 at 12:39, Alexander Yakushev notifications@github.com
wrote:

One more thing: by default AC does not initiate completion if it starts
inside a string. What about company-mode?


Reply to this email directly or view it on GitHub
#24 (comment)
.

Best Regards,
Bozhidar Batsov

http://www.batsov.com

@alexander-yakushev
Copy link
Owner

Done, please see my comment in clojure-emacs/cider#1062

@bbatsov
Copy link
Collaborator Author

bbatsov commented Apr 23, 2015

user> (compliment.sources.resources/resources-by-prefix "")
("meta-index" "META-INF/maven/cider/cider-nrepl/pom.properties")

This doesn't look totally right. I can find a file called meta-index and pom.properties is in the target directory of the lein project.

@bbatsov
Copy link
Collaborator Author

bbatsov commented Apr 25, 2015

@alexander-yakushev ping

@alexander-yakushev
Copy link
Owner

This doesn't look totally right. I can find a file called meta-index and pom.properties is in the target directory of the lein project.

Still they are considered as project resources by the way they look on the classpath. We can remove them two specifically, but who cares? Besides it is easier to test this functionality when you have them. Otherwise Compliment has no other resources.

@bbatsov
Copy link
Collaborator Author

bbatsov commented Apr 25, 2015

OK

On 25 April 2015 at 18:13, Alexander Yakushev notifications@github.com
wrote:

This doesn't look totally right. I can find a file called meta-index and
pom.properties is in the target directory of the lein project.

Still this is considered as project resources by the way they look on the
classpath. We can remove them two specifically, but who cares? Besides it
is easier to test this functionality when you have them. Otherwise
Compliment has no other resources.


Reply to this email directly or view it on GitHub
#24 (comment)
.

Best Regards,
Bozhidar Batsov

http://www.batsov.com

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

2 participants