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

Disabling auto braces #541

Open
949f45ac opened this issue Dec 13, 2023 · 2 comments
Open

Disabling auto braces #541

949f45ac opened this issue Dec 13, 2023 · 2 comments

Comments

@949f45ac
Copy link

949f45ac commented Dec 13, 2023

Hello,
I enjoy using this project very much, there is just one issue.
(Recently?) I started to receive automatically inserted closing braces when I add an opening brace somewhere in my code.
I would like to disable this behaviour (ANY automatically inserted characters confuse me immensely), but I could not figure out how to do it and/or which component of rustic precisely is at fault.
Thankful for any pointers

@appetrosyan
Copy link

This could be an LSP rather than Rustic thing, because I get the same behaviour on vanilla rust-mode with eglot.

@vaab
Copy link

vaab commented Jul 25, 2024

You should try setting lsp-enable-on-type-formatting to nil. This is a rust-analyzer bug (cf: rust-lang/rust-analyzer#16084 for more info). The latter post is suggesting to run the function (lsp-toggle-on-type-formatting), which drives the former variable and do some upkeeping of hooks after toggling the variable's value. I had more success with nil in the variable at rustic setup time.

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

No branches or pull requests

3 participants