Skip to content

Function parameters and parenthesis not completed #12243

@cgbur

Description

@cgbur

rust-analyzer version: rust-analyzer version: 94fa8a6 2022-05-12 nightly

rustc version: rustc 1.60.0 (7737e0b5c 2022-04-04)

relevant settings: Using vscode, everything default

When completing macros vs code, it properly adds the parentheses and parameters. When completing any local functions, no parentheses are added. Example below showing the difference between macros and local functions. I only noticed this because recently I was using typescript and these features are present in vscode.

This setting is enabled but it doesn't seem to change anything
Screen Shot 2022-05-13 at 12 53 59 PM

The behavior is the same with tab, enter, or clicking.

Here you can see it adds the parentheses properly:
Screen Shot 2022-05-13 at 12 49 42 PM
Screen Shot 2022-05-13 at 12 49 52 PM

But for a local function, so parenthesis or arguments are added:
Screen Shot 2022-05-13 at 12 50 08 PM
Screen Shot 2022-05-13 at 12 50 17 PM

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions