mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 21:35:20 +00:00
Automatically add semicolon when completing unit-returning functions
But provide a config to suppress that. I didn't check whether we are in statement expression position, because this is hard in completion (due to the natural incompleteness of source code when completion is invoked), and anyway using function returning unit as an argument to something seems... dubious.
This commit is contained in:
parent
08c7bbc2db
commit
779a7cb0e3
12 changed files with 217 additions and 40 deletions
|
@ -19,6 +19,7 @@ pub struct CompletionConfig {
|
|||
pub term_search_fuel: u64,
|
||||
pub full_function_signatures: bool,
|
||||
pub callable: Option<CallableSnippets>,
|
||||
pub add_semicolon_to_unit: bool,
|
||||
pub snippet_cap: Option<SnippetCap>,
|
||||
pub insert_use: InsertUseConfig,
|
||||
pub prefer_no_std: bool,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue