-
-
Notifications
You must be signed in to change notification settings - Fork 96
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
How about supporting "sweet" expressions aka readable Lisp syntax in the imenu? #527
Comments
Thanks for the request. I don't have an ideal quick answer, but a few thoughts, in a braindump:
Having said all that maybe there is some way to make the Racket Mode back end work (mostly, at least for things like Run) when the major mode is not |
Thank you very much for your thoughtful response.
I do not know paren-mode. I looked for it to no avail. I use show-paren-mode. Maybe that's what you mean? I haven't tried paredit-mode. FYI, since I wrote the original comment on this issue, I have subsequently discovered Wisp syntax https://srfi.schemers.org/srfi-119/srfi-119.html which I like more than sweet syntax. |
Here is the code for wisp syntax, fairly similar to the code for sweet syntax that I posted above:
|
Yes, sorry, I meant
On the one hand, On the other hand, many people try to use paredit-mode, find it "too strict", and give up. Sometimes they try again, months later, and give up again. I think for me, it took 3 tries, before it "clicked" for me. :) So you can focus on editing the structure of your code, which is both wonderful when you realize you want that... and a PITA before then. Someone joked, "If paredit isn't for you, then you need to become the kind of person paredit is for". I wish that weren't true but alas it seems to be. |
Thank you, I did not know it was possible to comment-out a line easily in Lisp (meaning without "manually" adjusting closing parentheses). Very good to know. Maybe I'll try paredit-mode. |
Please note that I am NOT asking for anything like full support for sweet expressions in this mode. I only want the imenu to work. I can make this happen now by changing to text mode and evaluating
(setq imenu-generic-expression '((nil "^define\\(/contract\\)? \\([^[:space:](]+\\)" 2)))
but then I lose other racket-mode features like C-c C-c runs the command racket-runI am referring to the syntax or notation described at https://readable.sourceforge.io/ and implemented at https://docs.racket-lang.org/sweet/index.html and https://pkgs.racket-lang.org/package/sweet-exp
The text was updated successfully, but these errors were encountered: