Skip to content

tom-pollak/lazygit-vscode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LazyGit for VSCode

Native integration of LazyGit directly in a VSCode window (not an integrated terminal)

lazygit-vscode-demo.mp4

Features

  • Toggle LazyGit in the full-screen editor within VSCode
  • Use a keyboard shortcut to quickly open or close LazyGit
  • Use e or o to open a file in a new tab from the lazygit window

VSCode integration

Set the following in your LazyGit config for VSCode support:

os:
  editPreset: "vscode"

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

Notes on Windows

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

Requirements

  • 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.

Usage

Use the keyboard shortcut Ctrl+Shift+L (or Cmd+Shift+L on macOS) to toggle LazyGit

  • lazygit-vscode.toggle: Toggle LazyGit

Extension Settings

  • 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: When working in split editors, maximize the lazygit window when showing lazygit (and restore on hide).
  • lazygit-vscode.autoHideSideBar: Auto-hide the side bar when showing lazygit.
  • lazygit-vscode.autoHidePanel: Auto-hide the panel when showing lazygit.

For settings to be applied, LazyGit window must be restarted (q).

More info

LazyGit