Skip to content

Option to disable semicolon insertion #21292

@9ary

Description

@9ary

When completing certain keywords, rust-analyzer appends a semicolon which is not visible in the preview text. For example:
Image

With return, it is sensible-enough to account for return type, but I still find it intrusive:

  • this is actually inconsistent behavior
  • it messes with my expectations and muscle memory, since the semicolon is not in the preview text and I am used to typing it manually
  • with break and continue, it doesn't consider context; I may want to specify a label, but the semicolon is inserted even when inside of labeled loops, so I have to delete the semicolon in those cases

https://rust-analyzer.github.io/book/configuration.html#completion.addSemicolonToUnit exists, but from a cursory reading of the source code, this only seems to apply to function call snippets which I also have disabled.

Metadata

Metadata

Assignees

Labels

C-featureCategory: feature request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions