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 cider-find-ns #1061

Closed
expez opened this issue Apr 3, 2015 · 9 comments
Closed

Add cider-find-ns #1061

expez opened this issue Apr 3, 2015 · 9 comments
Assignees

Comments

@expez
Copy link
Member

expez commented Apr 3, 2015

Here are some very common situations for me:

  1. I know some function exists, but I don't recall the exact name.
  2. I think maybe some function exists in lib and I want to check before I write it myself

I'm solving these now by using cider-classpath, C-s down to the lib, open the jar, look at the list of files and then picking something that looks promising.

cider-find-ns would give a completing read of all the available namespaces available on classpath, not just in my own project, and jumps to the selected ns.

@bbatsov
Copy link
Member

bbatsov commented Apr 4, 2015

If memory serves there's no mapping between namespaces and source files. How would you propose to tackle this? Maybe just use the info from a random var in the ns?

@expez
Copy link
Member Author

expez commented Apr 4, 2015

tools.namespace has everything we need to implement this. Specifically we can build a tracker for everything on classpath. The tracker has a :filemap which is a map of namespaces to files.

@bbatsov
Copy link
Member

bbatsov commented Apr 4, 2015

tools.namespace has everything we need to implement this. Specifically we can build a tracker for everything on classpath. The tracker has a :filemap which is a map of namespaces to files.

PR welcome, then! :-)

@bbatsov
Copy link
Member

bbatsov commented Apr 19, 2015

Anyone working on this?

@expez
Copy link
Member Author

expez commented Apr 19, 2015

Guess I'm not most likely candidate and I haven't gotten to it yet

@rundis
Copy link

rundis commented Apr 20, 2015

@expez When/if you get to this, maybe the ns-list op could use tools.namespace as well ?!

@alexander-yakushev
Copy link
Member

Does the ns-list returns only the list of namespaces, or their content as well?

@expez
Copy link
Member Author

expez commented Apr 20, 2015

@alexander-yakushev what we need to implement this is a map of ns => file which can be created using tools.namespace.

@bbatsov
Copy link
Member

bbatsov commented Apr 20, 2015

Yeah, this will probably be easy. The problem is that we'll also need to check if a namespace is loaded or not when we use this in places like the namespace browser. This shouldn't be hard, but still - it's a work we have to do.

@expez expez self-assigned this May 1, 2015
expez added a commit that referenced this issue May 2, 2015
Provide a completing read of available namespaces and jump to the file
containing its definition.
expez added a commit that referenced this issue May 2, 2015
Provide a completing read of available namespaces and jump to the file
containing its definition.
expez added a commit that referenced this issue May 2, 2015
Provide a completing read of available namespaces and jump to the file
containing its definition.
expez added a commit that referenced this issue May 2, 2015
Provide a completing read of available namespaces and jump to the file
containing its definition.
@expez expez closed this as completed in e64dfda May 2, 2015
bbatsov added a commit that referenced this issue May 2, 2015
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

4 participants