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

Request for Tree style source code viewer for Python buffer #4983

Closed
mandarvaze opened this issue Feb 6, 2016 · 7 comments
Closed

Request for Tree style source code viewer for Python buffer #4983

mandarvaze opened this issue Feb 6, 2016 · 7 comments

Comments

@mandarvaze
Copy link

Came across this
It will be useful to have this pre-configured with spacemacs python mode

@bmag
Copy link
Collaborator

bmag commented Feb 7, 2016

Have you tried any of these three packages, that do more-or-less the same thing, but for more than just python buffers?
imenu-list: #3109 (disclaimer: I wrote this one)
sr-speedbar: #3559
speedbar: built-in Emacs feature

imenu-list is the most similar to emacs-jedi-direx. Since imenu-list uses Imenu (a built-in Emacs feature), while emacs-jedi-direx uses Jedi (an external Python tool) directly, they won't always show exactly the same tree. However, Imenu can be taught to use Jedi to figure out the source tree for python buffers (anaconda-mode has an open issue for that), in which case the trees should be similar.

sr-speedbar and speedbar show also directories and files, not only source tree.

@StreakyCobra
Copy link
Contributor

I agree that one of these tree viewers should be added. I would prefer one supporting multiple languages and, as I'm not a fan of speedbar, imenu-list seems to be a good candidate. I should probably try it :-)

@mandarvaze
Copy link
Author

How do I install imenu-list ?
Do I just add to the dotspacemacs-additional-packages ?

@bmag
Copy link
Collaborator

bmag commented Feb 14, 2016

Yes, you can just add imenu-list to dotspacemacs-additional-packages.

Note that one of the PRs I linked adds a layer for imenu-list, and provides a few customizations and key-bindings that you might want. If you merge the PR locally, then you can enable the imenu-list layer instead of using dotspacemacs-additional-packages. Alternatively, if you don't want to deal with local merges, you can copy the relevant bits from the PR into dotspacemacs/user-config.

@mandarvaze
Copy link
Author

I gave this a look. I think this could work for me.
I will wait for the official "layer" (Till then it is working well via dotspacemacs-additional-packages)

@mandarvaze
Copy link
Author

I have been using this for a few days now, and I have to say imenu-list is awesome !!
I didn't know how else to appreciate the work done by @bmag (Couldn;t find twitter handle for a public shout-out)
imenu-list has been useful for other major modes as well.
Looking forward to this being official spacemacs layer soon.

@bmag
Copy link
Collaborator

bmag commented Feb 18, 2016

@mandarvaze thanks 😊

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