Simple extension for lazygit integration in vscode #3728
Replies: 5 comments 20 replies
-
lazygit-vscode-demo.mp4 |
Beta Was this translation helpful? Give feedback.
-
This is quite nice, thanks! One thing that I would wish for is that when I activate lazygit, it automatically hides the side bar and the bottom panel (as if pressing Command-B and Command-J if they are open), and ideally remembers the state and restores it again when you hide lazygit. (Would you prefer feedback like this as an issue in your repo?) |
Beta Was this translation helpful? Give feedback.
-
https://marketplace.visualstudio.com/items?itemName=ChaitanyaShahare.lazygit |
Beta Was this translation helpful? Give feedback.
-
@tom-pollak The recent update to 0.1.4 made things significantly worse for me:
Honestly I don't understand why you made all these changes. Caching the config and reloading it if it has changed is unnecessary; just query the individual configs every time you need them (like you did before), they always reflect the current setting, no need to cache and reload. I'd be curious to know what you were trying to improve with this. |
Beta Was this translation helpful? Give feedback.
-
I'll have to check out this extension to see if it can improve upon my non-extension workflow detailed below. I ended up just using this to keep it pretty similar to what I use in neovim
"vim.normalModeKeyBindingsNonRecursive": [
{
"before": [
"<leader>",
"g",
"g"
],
"commands": [
"workbench.action.closeSidebar",
"workbench.action.closeAuxiliaryBar",
"workbench.action.toggleMaximizedPanel",
"terminal.focus",
{
"command": "workbench.action.terminal.sendSequence",
"args": {
"text": "lazygit\r" // note there is NO secondary `&& exit\r` here so that the <ctrl-g> (below) can do its thing and we end up in a better overall editor state for panels and file explorer, etc. and with the terminal still running after lazygit exits rather than fully exiting out of the terminal, which by the way still doesn't toggleMaximizedPanel, annoyingly.
}
}
]
},
]
[
{
"key": "ctrl+g", // force the panel to minimize
"command": "runCommands",
"args": {
"commands": [
"workbench.action.focusActiveEditorGroup", // some sort of hack to actually force the panel to minimize
"workbench.files.action.focusFilesExplorer", // we're in a weird nothing is focused state when the panel is minimized in this way, so focus the explorer
"list.select", // finally select the file in the explorer to return our cursor to the editor where it started
"workbench.action.togglePanel", // optional, but I like it hidden when coming back from lazygit. Comment this out and it'll show but in the minimized bottom view.
]
}
},
] This supports the somewhat weird edge case where you've maximized the panel (perhaps to do some terminal stuff) then you hide it with PS I came here to see if we could fix the highlight color of the selected file in the lazygit file tree. It's too opaque and makes it really hard to see the current staged/unstaged color/status of the file the cursor is on. Anyone have any ideas about that in vscode? |
Beta Was this translation helpful? Give feedback.
-
https://marketplace.visualstudio.com/items?itemName=TomPollak.lazygit-vscode
Beta Was this translation helpful? Give feedback.
All reactions