Native integration of LazyGit directly in a VSCode window (not an integrated terminal)
lazygit-vscode-demo.mp4
- Toggle LazyGit in the full-screen editor within VSCode
- Use a keyboard shortcut to quickly open or close LazyGit
- Use
e
oro
to open a file in a new tab from the lazygit window
Set the following in your LazyGit config for VSCode support:
os:
editPreset: "vscode"
promptToReturnFromSubprocess: false # removes "press enter to return to lazygit" popup
This allows a pretty slick experience opening windows with e
If you prefer to use a different tool on the cli, you can configure a custom LazyGit config for VSCode with
lazygit-vscode.configPath
Default cmd is ctrl+shift+l which may be captured by the shell. Ensure the following config
"terminal.integrated.sendKeybindingsToShell": false, // ensure this is false
"terminal.integrated.commandsToSkipShell": ["lazygit-vscode.toggle", "workbench.action.closeWindow"], // add this
- LazyGit must be installed on your system and accessible in your PATH (or set with
lazygit-vscode.lazygitPath
). You can find installation instructions for LazyGit here.
Use the keyboard shortcut Ctrl+Shift+L
(or Cmd+Shift+L
on macOS) to toggle LazyGit
lazygit-vscode.toggle
: Toggle LazyGit
lazygit-vscode.lazygitPath
: Manually set LazyGit path. Otherwise use default system PATH.lazygit-vscode.configPath
: Set custom LazyGit config. Useful if you like different behaviour between VSCode and CLI.lazygit-vscode.autoMaximizeWindow
: Maximize the lazygit window in the editor (keeps sidebar visible). Useful when working with split editors.
You can control how LazyGit interacts with VS Code UI panels using the panels
setting. Each panel can be set to:
"keep"
: Leave panel as is (default)"hide"
: Hide the panel when showing LazyGit"hideRestore"
: Hide the panel when showing LazyGit and restore it when closing
Example configuration:
"lazygit-vscode.panels": {
"sidebar": "hideRestore",
"panel": "hide",
"secondarySidebar": "keep"
}
lazygit-vscode.panels.sidebar
: Primary sidebar (Explorer, Source Control, etc.)lazygit-vscode.panels.panel
: Bottom panel (Terminal, Output, etc.)lazygit-vscode.panels.secondarySidebar
: Secondary sidebar (usually on the right side)
Note: Legacy settings
autoHideSideBar
andautoHidePanel
are still supported but deprecated.
For settings to be applied, LazyGit window must be restarted (q
).