1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-12-04 10:34:55 +02:00

Add an editor preset for kakoune (kakoune.org).

This commit is contained in:
J. B. Rainsberger 2023-04-27 12:47:47 -03:00
parent b17c38befd
commit 6c010a788c
No known key found for this signature in database
GPG Key ID: DF45EBBA4A7D5BFC

View File

@ -37,11 +37,12 @@ type editPreset struct {
func getPreset(osConfig *OSConfig, guessDefaultEditor func() string) *editPreset { func getPreset(osConfig *OSConfig, guessDefaultEditor func() string) *editPreset {
presets := map[string]*editPreset{ presets := map[string]*editPreset{
"vi": standardTerminalEditorPreset("vi"), "vi": standardTerminalEditorPreset("vi"),
"vim": standardTerminalEditorPreset("vim"), "vim": standardTerminalEditorPreset("vim"),
"nvim": standardTerminalEditorPreset("nvim"), "nvim": standardTerminalEditorPreset("nvim"),
"emacs": standardTerminalEditorPreset("emacs"), "emacs": standardTerminalEditorPreset("emacs"),
"nano": standardTerminalEditorPreset("nano"), "nano": standardTerminalEditorPreset("nano"),
"kakoune": standardTerminalEditorPreset("kakoune"),
"vscode": { "vscode": {
editTemplate: "code --reuse-window -- {{filename}}", editTemplate: "code --reuse-window -- {{filename}}",
editAtLineTemplate: "code --reuse-window --goto -- {{filename}}:{{line}}", editAtLineTemplate: "code --reuse-window --goto -- {{filename}}:{{line}}",
@ -70,6 +71,7 @@ func getPreset(osConfig *OSConfig, guessDefaultEditor func() string) *editPreset
// Some of our presets have a different name than the editor they are using. // Some of our presets have a different name than the editor they are using.
editorToPreset := map[string]string{ editorToPreset := map[string]string{
"kak": "kakoune",
"code": "vscode", "code": "vscode",
"subl": "sublime", "subl": "sublime",
"xed": "xcode", "xed": "xcode",