]> git.lizzy.rs Git - rust.git/commit
Merge #2981
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>
Tue, 4 Feb 2020 09:52:57 +0000 (09:52 +0000)
committerGitHub <noreply@github.com>
Tue, 4 Feb 2020 09:52:57 +0000 (09:52 +0000)
commitc1a06499fa5f9a40750cbfc30a7d399228a5fab0
tree9f2a049a5d9e49c55f41fd27b1a264d051f044c9
parent73c36fdbd2060bd455ffeef33dca1ecc2ae07ebb
parent875dc6d1a4973f70cd48b797ae755d1bd7a83fa5
Merge #2981

2981: vscode: Add ability to call onEnter without overriding "type". r=matklad a=71

Before this PR, the only way to get enhanced typing (right now, only with `onEnter`) was to override VS Code's `type` command. This leads to issues with extensions like [VsCodeVim](https://github.com/VSCodeVim/Vim) that need to override `type` as well.

This PR adds an additional command, `onEnter`. This command can be used with the following keybinding, which allows the user to get smart `onEnter` behavior without overriding `type`.

```json
{
    "key": "enter",
    "command": "rust-analyzer.onEnter",
    "when": "editorTextFocus && editorLangId == rust"
}
```

Co-authored-by: Gregoire Geis <git@gregoirege.is>
Co-authored-by: Grégoire Geis <git@gregoirege.is>