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

macrostep-c Not working with c-ts-mode #8

Open
Dickby opened this issue May 5, 2023 · 3 comments
Open

macrostep-c Not working with c-ts-mode #8

Dickby opened this issue May 5, 2023 · 3 comments

Comments

@Dickby
Copy link

Dickby commented May 5, 2023

Whenever I try to use macrostep in c-ts-mode it errors with Scan error: "Unbalanced parentheses".
If i really need to use it, i have to switch to c-mode just for that command.

@montchr
Copy link

montchr commented Feb 18, 2024

I am also running into this same error message. However, it is happening even in emacs-lisp-mode.

I do also use some tree-sitter modes, though I still run into this error in sessions where none of them have been activated.

@montchr
Copy link

montchr commented Feb 18, 2024

@Dickby do you happen to be using lispy + the macrostep lispy-compat feature?

@montchr
Copy link

montchr commented Feb 18, 2024

Well, it might not matter anyway -- this is a known issue from the original repo (see the list). See joddie#11 (comment) for a workaround, which I can confirm fixes the issue. Reposting so it doesn't get lost:

;; <https://github.com/joddie/macrostep/issues/11>
;; <https://github.com/emacsorphanage/macrostep/issues/8>
(defun my-macrostep-expand-wrapper ()
  "Work around `macrostep-expand' not liking whitespace after a sexp."
  (interactive)
  (when (and (= ?\n (char-after))
             (= (point) (cdr (bounds-of-thing-at-point 'sexp))))
    (backward-char))
  (macrostep-expand))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants