parinfer-rust-mode
parinfer-rust-mode copied to clipboard
Issue when insert space after some non-ASCII char.
Hi, I meet this issue with the indent
and smart
modes.
|
indicates the cursor. The 中
can be any CJK/emoji/...
(func 中|)
After hit SPC,
Except:
(func 中 |)
Actually
(func 中)|
But if it is an ASCII char
(func a|)
;; ->
(func a |)
According to my observation, if I yank a space after 中
, it is feasible, works as the ASCII char.
(func 中|)
;; yank a space->
(func 中 |)
So, is it possible to avoid this issue?
Hi thanks for pointing this out. It is not ideal. 🙁
Unfortunately, with a cursory glance, this appears to be an issue in the library that parinfer-rust-mode uses. The author has made a note of it here, but not much progress has been made.
I'm going to try and find some time to validate that this isn't an emacs/implementation issue, but as of right now I wouldn't hold my breath.
Yank can work, because I have special code to handle yanks and treat every yank operation as being in paren-mode. Note how you can yank one space, but if you then try to insert a second space through conventional means it skips over the bracket like in your examples.
Hi, thank you very much for your explanation and tips.
At present, I have added (quoted-insert . "parn")
to parinfer-rust-treat-command-as
, and then C-q SPC
will input SPC after these characters.