Commit graph

21 commits

Author SHA1 Message Date
Stefan Haller b1e9ac3969 Remove a few unnecessary parentheses
The new version of gofumpt that we are going to update to in a moment
would complain about these.
2026-08-13 20:40:11 +02:00
baiyei_dk 7eb561921b fix(config): add Nushell support for nvim-remote preset
Using Nushell's native if/else syntax to avoid '&&' syntax errors
in the nvim-remote editor preset.
Closes #5211
2026-02-07 09:00:10 +01:00
SavingFrame 4d0eaea6fc Fix nvim-remote commands for fish shell
Fish shell does not support "&&" and "||" operators like
POSIX-compatible shells. Instead, it uses a different syntax structure
based on begin/end and if/else.

This caused existing lazygit nvim-remote integration templates to break
when fish was the user's default shell.

This commit adds explicit fish shell detection using the FISH_VERSION
environment variable, and provides fish-compatible templates that
correctly handle launching Neovim or sending remote commands via $NVIM.

Fixes behavior where edits would not open in a new Neovim tab or line
navigation would fail when $NVIM was set.

Ensures smoother editing experience for users running fish shell
(supported since Nov 2012 with FISH_VERSION).
2025-04-27 20:12:11 +02:00
rako f989425f8c Add acme editor preset 2025-03-06 15:02:53 +01:00
Nikita Karamov 2b3525bfd6 Fix micro editor preset 2025-01-09 08:48:59 +01:00
Dmytro Suvorov f0eafabd6d
Add Zed support to editor_presets.go 2024-09-03 17:30:56 +03:00
Charlie Moog 615ff09afa improve nvim-remote mode
- If _not_ inside a neovim session, treat as
  a normal nvim session and suspend lazygit.

- If inside a neovim session:
  - Do not try to suspend lazygit.
  - Send `q` keystroke to neovim session to quit lazygit.
  - Send filename/line/etc. to neovim session.
2024-05-19 14:39:02 +10:00
Stefan Haller 581161ac34 Provide two helix presets, one for "helix" and one for "hx"
The helix binary seems to be called "helix" on some distributions (e.g. Arch),
but "hx" on others (e.g. Fedora). Provide presets for both, so that
auto-detection from $EDITOR works.
2024-03-02 10:15:03 +01:00
zottelsheep 7ffb6ffb0f Add 'lvim' editor preset for lunarvim
Add 'lvim' as a new standardTerminalEditorPreset, since lunarvim uses an alias for nvim.
2023-10-14 15:04:23 +02:00
Nikita Karamov 8390622f70
Add Micro editor preset 2023-10-03 19:42:28 +02:00
Jesse Duffield 9c5eedf748 use 'suspend' instead of 'editInTerminal' internally
'suspend' is a more appropriate name, especially now that you can choose not to suspend despite
still being in a terminal
2023-08-09 22:03:58 +10:00
Jesse Duffield aa74239f05 Add nvim-remote editor preset
This allows us to jump back to the parent neovim process when we want to edit a file, rather than opening a new neovim
process within lazygit.

Arguably this should be the default, but I'm not familiar with the various ways people use lazygit with neovim.
2023-08-09 21:32:53 +10:00
Jesse Duffield 9e7018db8a Honour editInTerminal value when opening a worktree folder
There was no good reason not to do this in the first place.
2023-08-09 21:00:27 +10:00
Jesse Duffield d30eef69b1 Use double dash for disambuating path in editor templates 2023-07-30 18:35:36 +10:00
Jesse Duffield 3a7468ecac Support opening worktree in editor 2023-07-30 18:35:23 +10:00
Enrico Borba cbbb281011
kakoune binary name 2023-06-05 08:53:39 -04:00
Jesse Duffield 9c384c5267 Clean up helix editor preset 2023-05-26 09:19:12 +10:00
dvic ed496deeca
Add helix editor preset 2023-05-24 23:08:26 +02:00
Jesse Duffield 3cac14c76e add comment to encourage keeping code and docs in sync 2023-05-04 16:53:13 +10:00
J. B. Rainsberger 6c010a788c
Add an editor preset for kakoune (kakoune.org). 2023-04-27 13:41:54 -03:00
Stefan Haller 659d668e16 Implement edit presets 2023-04-13 13:14:00 +02:00