-
Notifications
You must be signed in to change notification settings - Fork 174
Add imenu support #87
base: master
Are you sure you want to change the base?
Conversation
Closes #65 |
Thanks! I'm not dead, just a bit busy at the moment :) I'll review and merge this as soon as I get to proper computer. |
@pashky good to heal you are still kicking... thanks |
Ok, so how does one use it? I've never used imenu myself unfortunately, so not familiar with it. I tried calling M-x imenu and got user-error: This buffer cannot use `imenu-default-create-index-function' What's the purpose of restclient-goto-current-min and splitting restclient-http-parse-current-and-do into two? |
you tried calling imenu?
Yeah, you aren't using the imenu functions from this pull request. I think I forgot the line: (set (make-local-variable 'imenu-create-index-function) #'restclient-create-imenu-index) which i have in my local copy. Sorry about that. As I mentioned this was sort of WIP. Its in a good working state now though, so ill fix it an update.
I thought it might be useful. Can remove if you don't want it.
Single responsibility principle thing. Originally I was using |
Ping? |
I've reviewed your change.
if I do |
Fixed
Fixed
This was deliberate -- without this change there isn't consistency about where you jump to when navigating between requests. Seems like its better to always go to the uri line when you do a jump forward or backwards. I changed it back for you, but I don't understand why this behavior is preferred
an httpbin file? this is imenu for restclient. I'm assuming you have restclient mode enabled? Can you |
restclient-gooooot-current-min behavior.
ping |
This would be awesome to have. I absolutely love imenu (particularly helm-imenu, you should try it!). |
I'm happy to deal with merge conflicts if @pashky will agree to merge this. I really think that imenu is a better option than direct helm support |
@IvanMalison Do you have some code in your I was about to write this myself, but realized it was more work than I have time for right now and a google led me here ;) |
@expez Just use this pull request? I believe its in my fork... |
@pashky @IvanMalison not sure what is status of this PR, but this simple line can also provide imenu support: (require 'imenu)
(setq imenu-generic-expression '((nil "^[A-Z]+\s+.+" 0))) Nothing fancy, just will display things like |
This is sort of WIP. I think that everything works properly, but the code feels a little messy to me.