Skip to content

Typing < inserts gibberish #12379

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

Open
SludgePhD opened this issue May 24, 2022 · 3 comments
Open

Typing < inserts gibberish #12379

SludgePhD opened this issue May 24, 2022 · 3 comments
Labels
A-vscode vscode plugin issues C-bug Category: bug

Comments

@SludgePhD
Copy link

rust-analyzer version: 84be2ea 2022-05-23 stable

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

relevant settings: Didn't find any

Sometimes, typing < to specify generics inserts $0, like here:

let v: Vec

The result is let v: Vec<$0>, which is invalid code.

This started happening on the latest release.

@Veykril Veykril added A-vscode vscode plugin issues Broken Window Bugs / technical debt to be addressed immediately C-bug Category: bug labels May 24, 2022
@leshow
Copy link

leshow commented May 25, 2022

I am getting this also, rustc version 1.59, I tried the pre-release and release versions of RA from vscode, no change.

INFO [5/24/2022, 8:07:12 PM]: PersistentState: { serverVersion: '0.3.1066' }
INFO [5/24/2022, 8:07:12 PM]: Using server binary at /home/leshow/.vscode/extensions/rust-lang.rust-analyzer-0.3.1066-linux-x64/server/rust-analyzer

The $0 seems to be placeholder argument text

@lnicola
Copy link
Member

lnicola commented May 25, 2022

This is fallout from #11830.

bors added a commit that referenced this issue May 25, 2022
internal: Make autoclosing angle brackets configurable, disabled by default

cc #12379
@Veykril
Copy link
Member

Veykril commented May 25, 2022

#12382 will disable this feature by default until we fix it properly (that is we either have to implement or put this behind a new lsp extension, we should probably prefer the latter)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-vscode vscode plugin issues C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

4 participants