Commit Graph
238 Commits
Author SHA1 Message Date
Stefan Haller 150260c8a1 Update keybinding names to match names in menu 2024-02-02 18:42:24 +01:00
Stefan Haller 36134006c5 Add config setting to suppress showing file icons 2024-01-22 08:40:03 +01:00
Jesse Duffield 280b4d60f8 Support select range for cherry pick
This requires us to change the 'v' keybinding for paste to something else,
now that 'v' is used globally for toggling range select. So I'm using
'shift+v' and I'm likewise changing 'c' to 'shift+c' for copying, so
that they're consistent.

We will need to clearly communicate this change in keybindings.
2024-01-19 10:50:49 +11:00
Jesse Duffield f3eb180f75 Standardise display of range selection across views
We're not fully standardising here: different contexts can store their range state however
they like. What we are standardising on is that now the view is always responsible for
highlighting the selected lines, meaning the context/controller needs to tell the view
where the range start is.

Two convenient benefits from this change:
1) we no longer need bespoke code in integration tests for asserting on selected lines because
we can just ask the view
2) line selection in staging/patch-building/merge-conflicts views now look the same as in
list views i.e. the highlight applies to the whole line (including trailing space)

I also noticed a bug with merge conflicts not rendering the selection on focus though I suspect
it wasn't a bug with any real consequences when the view wasn't displaying the selection.

I'm going to scrap the selectedRangeBgColor config and just let it use the single line
background color. Hopefully nobody cares, but there's really no need for an extra config.
2024-01-19 10:47:21 +11:00
Jesse Duffield 24a4302c52 Add range selection ability on list contexts
This adds range select ability in two ways:
1) Sticky: like what we already have with the staging view i.e. press v then use arrow keys
2) Non-sticky: where you just use shift+up/down to expand the range

The state machine works like this:
(no range, press 'v') -> sticky range
(no range, press arrow) -> no range
(no range, press shift+arrow) -> nonsticky range
(sticky range, press 'v') -> no range
(sticky range, press arrow) -> sticky range
(sticky range, press shift+arrow) -> nonsticky range
(nonsticky range, press 'v') -> no range
(nonsticky range, press arrow) -> no range
(nonsticky range, press shift+arrow) -> nonsticky range
2024-01-19 10:47:21 +11:00
Stefan Haller 8ca78412ac Add command to find base commit for creating a fixup 2024-01-10 09:11:40 +01:00
Stefan Haller d70dd5123d Add config setting for side panel location (left or top) in half screen mode 2024-01-09 15:45:26 +01:00
ZeroMaskandGitHub d00936fb4e fix: MacOS default path misspelling 2023-12-07 11:52:39 +03: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
Karim Khaleel d02deeefd8 Add disabled compat for user config (#2833)
Treat <disabled> setting as equivalent to "null"
in keybindings user configs.
2023-10-09 22:34:50 +03:00
Nikita Karamov 8390622f70 Add Micro editor preset 2023-10-03 19:42:28 +02:00
Louis DeLosSantosandStefan Haller 9c72d8a2b0 Add ability to force portrait mode
A new gui config flag 'portraitMode':<string> is added to influence when
LazyGit stacks its UI components on top of one another.

The accepted values are 'auto', 'always', 'never'.

'auto': enter portrait mode when terminal becomes narrow enough

'always': always use portrait mode unconditional of the terminal
dimensions

'never': never use portraid mode

Signed-off-by: Louis DeLosSantos <louis.delos@gmail.com>
2023-09-30 20:57:38 +02:00
Stefan Haller 5b8a8d356c Change the default of the "gui.borders" config to "rounded"
Most people seem to agree that it looks better than the sharp edges of "single".
2023-09-09 10:42:24 +02:00
Maria José SolanoandStefan Haller 387fbf6ab6 feat: add jump-to-panel label setting 2023-09-09 09:45:08 +02:00
Stefan Haller 7774fe0ab3 Move diff context size from UserConfig to AppState 2023-09-05 13:55:30 +02:00
Mark Skelton e95505453e Update docs 2023-08-25 08:52:52 -05:00
Jesse DuffieldandGitHub b2023f10b6 Fix: Update 'zh' to 'zh-CN' in lazygit Language Configuration (#2842) 2023-08-21 17:56:45 +10:00
Stefan Haller b2d629b50a Add scrollOffEnabled config 2023-08-21 09:03:45 +02:00
Stefan Haller 51d9f70f9e Fix section levels
These appeared as subsections of "Platform Defaults", which doesn't make sense.
2023-08-21 08:10:28 +02:00
Stefan Haller 341b9725d4 Add ScrollOffMargin user config
When set to a non-zero value, views will scroll when the selection gets this
close to the top or bottom of the view.
2023-08-15 11:40:40 +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 ca08956f77 Use soft wrapping in config doc
Looking online I can't find any consensus about whether soft or hard wrap is better.
This post goes into the pros/cons: https://martin-ueding.de/posts/hard-vs-soft-line-wrap/

I find that editing hard-wrapped text is a pain in the ass, and it's hard to enforce
consistency. So I'm switching to soft-wrapping for this doc.
2023-08-09 21:33:12 +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 DuffieldandGitHub ebd56bd8d5 Mention JSON schema (#2893) 2023-08-08 08:19:05 +10:00
82b5c20050 Add zh-TW to docs/Config.md
Co-authored-by: Bill ZHANG <36790218+Lutra-Fs@users.noreply.github.com>
2023-08-07 19:52:28 +08:00
EmilySeville7cfg f32fe84c9b feat(doc): better JSON schema usage explanation 2023-08-07 18:27:37 +10:00
EmilySeville7cfg fb05ee369f feat(doc): mention JSON schema 2023-08-07 03:38:30 +10:00
Jesse Duffield a200fccba9 Add explosion animation when nuking working tree
I've been thinking about this for a while: I think it looks really cool if nuking your working tree
actually results in a nuke animation.

So I've added an opt-out config for it
2023-08-01 22:16:04 +10:00
Stefan Haller 9c57444adc Remove the old experimentalShowBranchHeads mechanism and config
We are going to replace it with a better one later in this branch.
2023-07-31 08:34:00 +02:00
Jesse Duffield 3a7468ecac Support opening worktree in editor 2023-07-30 18:35:23 +10:00
Red SandJesse Duffield d7f84aed8a feat: add os.copyToClipboardCmd to allow for a custom command
Issue #1055

test: CopyPatchToClipboard (temporary commit for review)
2023-07-29 19:09:59 +10:00
微笑andGitHub 1431ffcebf Corrected 'zh' to 'zh-CN' in lazygit docs for proper localization 2023-07-29 12:07:40 +08:00
Scott CallawayandStefan Haller 9617737352 config: rely on .gitconfig for verbose commit messages
As discussed in https://github.com/jesseduffield/lazygit/pull/2599, it
makes more sense to have the user specify whether they want verbose
commits from their own git config, rather than lazygit config.

This means that we can remove all the code (including test coverage)
associated with the custom verbose flag, and lazygit will just inherit
the .gitconfig settings automatically.
2023-07-14 07:56:09 +02:00
Jesse Duffield 9df634f13f Color view frame differently when searching/filtering
Given that we now persist search/filter states even after a side context loses focus, we need to make it really
clear to the user that the context is currently being searched/filtered
2023-07-03 12:54:14 +10:00
Amirzhan Aliyev 5133113142 feat(i18n): add russian translation 2023-06-28 00:34:59 +06:00
Stefan Haller 51a558040d Fix the title and text (and variable names) of the Discard Changes prompt
The title was saying "Unstage lines", which was just wrong. The text said
"Delete lines", which can be seen as a bit misleading; we are only discarding
the changes to the selected lines, not deleting the lines themselves.

For consistency, rename the config variable skipUnstageLineWarning accordingly.
2023-06-26 08:15:35 +02:00
Stefan Haller 77c5d1761d Add nerdFontsVersion config 2023-06-15 21:47:52 +02:00
Jesse Duffield a4db44bc3d show commits against branches 2023-06-01 19:21:24 +10:00
Stefan Haller 31a2ea1f19 Add --all to "git fetch" command when not fetching a specific remote 2023-06-01 10:13:14 +02:00
Jesse Duffield 0e0458f355 More compact and flexible date format
You can now configure both a time format and a short time format, where the short format kicks in
when the time is within the last day
2023-05-26 17:31:39 +10:00
dvic ed496deeca Add helix editor preset 2023-05-24 23:08:26 +02:00
Jesse Duffield 820f7b9404 Support strikethrough text style 2023-05-21 10:46:13 +10:00
Stefan Haller 46b93bba0e Add config git.mainBranches
It defaults to {"master", "main"}, but can be set to whatever branch names
are used as base branches, e.g. {"master", "devel", "v1.0-hotfixes"}. It is
used for color-coding the shas in the commit list, i.e. to decide whether
commits are green or yellow.
2023-05-16 13:20:03 +02:00
Christian Rackerseder 1636931c2b Include "kakoune" in supported edit presets 2023-05-04 08:28:58 +02:00
Christian Rackerseder 6e027f42da Include "nvim" in supported edit presets 2023-05-03 13:30:51 +02:00
Jesse Duffield c88ecdf87c update open docs 2023-05-03 13:48:04 +10:00
Stefan HallerandJesse Duffield fba1a2b5ac Add config gui.experimentalShowBranchHeads
People find the new (*) display for branch heads in the commits list confusing,
so make it opt-in for now.
2023-05-02 18:58:54 +10:00
SeanandJesse Duffield 49da7b482d Split commit message panel into commit summary and commit description panel
When we use the one panel for the entire commit message, its tricky to have a keybinding both for adding a newline and submitting.
By having two panels: one for the summary line and one for the description, we allow for 'enter' to submit the message when done from the summary panel,
and 'enter' to add a newline when done from the description panel. Alt-enter, for those who can use that key combo, also works for submitting the message
from the description panel. For those who can't use that key combo, and don't want to remap the keybinding, they can hit tab to go back to the summary panel
and then 'enter' to submit the message.

We have some awkwardness in that both contexts (i.e. panels) need to appear and disappear in tandem and we don't have a great way of handling that concept,
so we just push both contexts one after the other, and likewise remove both contexts when we escape.
2023-04-30 12:17:34 +10:00
Noah Gao bf3dd79b7a feat: add gitea to hosting service 2023-04-18 16:16:09 +00:00
Stefan Haller e3c5e07b20 Update documentation 2023-04-13 13:14:00 +02:00