Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/Config.md
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ os:
editPreset: 'vscode'
```

Supported presets are `vim`, `nvim`, `nvim-remote`, `lvim`, `emacs`, `nano`, `micro`, `vscode`, `sublime`, `bbedit`, `kakoune`, `helix`, and `xcode`. In many cases lazygit will be able to guess the right preset from your $(git config core.editor), or an environment variable such as $VISUAL or $EDITOR.
Supported presets are `vim`, `nvim`, `nvim-remote`, `lvim`, `emacs`, `nano`, `micro`, `vscode`, `sublime`, `bbedit`, `kakoune`, `helix`, `xcode`, and `zed`. In many cases lazygit will be able to guess the right preset from your $(git config core.editor), or an environment variable such as $VISUAL or $EDITOR.

`nvim-remote` is an experimental preset for when you have invoked lazygit from within a neovim process, allowing lazygit to open the file from within the parent process rather than spawning a new one.

Expand Down
7 changes: 7 additions & 0 deletions pkg/config/editor_presets.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,13 @@ func getPreset(osConfig *OSConfig, guessDefaultEditor func() string) *editPreset
openDirInEditorTemplate: "xed -- {{dir}}",
suspend: returnBool(false),
},
"zed": {
editTemplate: "zed -- {{filename}}",
editAtLineTemplate: "zed -- {{filename}}:{{line}}",
editAtLineAndWaitTemplate: "zed --wait -- {{filename}}:{{line}}",
openDirInEditorTemplate: "zed -- {{dir}}",
suspend: returnBool(false),
},
}

// Some of our presets have a different name than the editor they are using.
Expand Down
2 changes: 1 addition & 1 deletion pkg/config/user_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ type OSConfig struct {

// A built-in preset that sets all of the above settings. Supported presets
// are defined in the getPreset function in editor_presets.go.
EditPreset string `yaml:"editPreset,omitempty" jsonschema:"example=vim,example=nvim,example=emacs,example=nano,example=vscode,example=sublime,example=kakoune,example=helix,example=xcode"`
EditPreset string `yaml:"editPreset,omitempty" jsonschema:"example=vim,example=nvim,example=emacs,example=nano,example=vscode,example=sublime,example=kakoune,example=helix,example=xcode,example=zed"`

// Command for opening a file, as if the file is double-clicked. Should
// contain "{{filename}}", but doesn't support "{{line}}".
Expand Down
3 changes: 2 additions & 1 deletion schema/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,8 @@
"sublime",
"kakoune",
"helix",
"xcode"
"xcode",
"zed"
]
},
"open": {
Expand Down
Loading