-
-
Notifications
You must be signed in to change notification settings - Fork 642
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
implement cider-eval-enclosing-form #2899
Comments
I thought @dpsutton already implemented something like this a while ago.
|
Let (comment (+ 2| 3))
I want to evaluate the |
@xificurC did you |
Hi @dakra , no, since I didn't know of that variable. Surprisingly (to me at least) it's in clojure and not cider. I'd still consider the original suggestion, but I'll play around with this and see it fills my use cases. Thanks! |
Because the logic for sexp boundaries lives in |
Given it has a fix/workaround, I'll close this issue. PRs (accompanied by a convincing pitch) most welcome! |
I found a reasonable solution (defun my/cider-ppe-list ()
(interactive)
(cider--pprint-eval-form (cider-list-at-point 'bounds))) |
Is your feature request related to a problem? Please describe.
I'm often with the cursor inside a form I'd like to evaluate. Typically in rich comments I edit an argument and want to try reevaluating the wrapping form. If it's in the middle of the
(comment)
block I need to go to the beginning of the next line (evil/vim curse, can't put cursor past last character) and runcider-eval-last-sexp
.Describe the solution you'd like
Ideally I'd want to stay where I am with the cursor and run the parenthesized expression that encloses it. Finding the enclosing paren is done by searching for the first opening paren to the left. The function could be easily enriched by searching for the second highest enclosing paren via
universal-argument
.Describe alternatives you've considered
I've looked through all
cider-eval-*
functions and found none that meet my needs. Maybe I'm just blind though :)Another option that would cover 80-90% of my use cases would be if
cider-eval-defun-at-point
would treat(comment)
blocks as special and thought of each inner form as a separate toplevel form.Additional context
The text was updated successfully, but these errors were encountered: