-
Notifications
You must be signed in to change notification settings - Fork 17
Home
For the times when parinfer-rust-mode
needs your guidance.
Is parinfer misbehaving in smart-mode
? This could be due to a bug or because some commands(evil
) are just plain weird. parinfer-rust-treat-command-as
is an escape hatch for smart mode that allows you to tell parinfer-rust-mode what mode to run a specific command. parinfer-rust-treat-command-as
is a list of pairs. The first item in the pair specifies the command and the second item in the pair specifies the mode the command should be run under. For example (yank . "paren")
, tells parinfer-rust-mode to override smart mode
and run under paren mode
when it detects that yank caused a change in the buffer.
You can extend to parinfer-rust-treat-command-as using add-to-list as shown below:
(add-to-list 'parinfer-rust-treat-command-as '(your-command . "paren"))
;;or
(add-to-list 'parinfer-rust-treat-command-as '(your-command . "indent"))
If guile is your flavour of scheme you can override the scheme option in the parinfer-rust-major-mode-options
plist
with parinfer-rust-guile-options
.
(setopt parinfer-rust-major-mode-options (plist-put parinfer-rust-major-mode-options 'scheme-mode 'parinfer-rust-guile-options))
Or overwrite the major-mode-options using a .dir-locals-el.
((scheme-mode . ((parinfer-rust-major-mode-options . (scheme-mode (:lisp-vline-symbols t
:lisp-block-comments t
:guile-block-comments t
:scheme-sexp-comments t))))))
If you use vundo
you might occasionally get an error message like:
Error running timer ‘track-changes--call-signal’: (buffer-read-only #<buffer parinfer-rust-mode.el>)
This is caused by vundo
locking the buffer as read-only while you are going through the undo-tree
. The fix here would be to use vundo's hooks to turn parinfer-rust-mode off and on as necessary.
(use-package parinfer-rust-mode
;; ...
:config
(add-hook 'vundo-pre-enter-hook (lambda () (parinfer-rust-mode 0) nil t))
(add-hook 'vundo-post-exit-hook (lambda () (parinfer-rust-mode 1) nil t)))