1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-11-24 08:52:21 +02:00
Commit Graph

29 Commits

Author SHA1 Message Date
Stefan Haller
4bfda1a78c Fix boolean config keys not appearing in the generated Config.md
The reason why they didn't appear is that they didn't get a default value in the
generated schema; this commit fixes that.
2024-05-31 20:07:58 +02:00
Stefan Haller
91cb33db85 Remove an outdated comment
Lazygit doesn't touch this, the comment is just not true.

I wonder if we need the config at all, actually; I'd be in favor of removing it.
2024-05-31 20:05:44 +02:00
Stefan Haller
22a38c9f50 Add property outputTitle to CustomCommand
It can optionally be used to set the title of the panel that shows the output of
a command (when showOutput is true). If left unset, the command string is used
as the title.
2024-05-20 21:02:49 +02:00
Karim Khaleel
9b152d7619 Make Keybindings definition in UserConfig struct last
This makes the generated default config in Config.md match the original
order.
2024-05-19 14:08:27 +02:00
Karim Khaleel
7d787afb2c Set default value for WindowSize config to pass validation 2024-05-19 14:07:51 +02:00
Karim Khaleel
af842e40d4 Remove unnecesary schema validations in user config 2024-05-19 14:07:40 +02:00
Jonathan Duck
01ff18dd92 Add commitPrefix for defining a prefix for any project 2024-05-01 19:03:12 +02:00
Olivia Bahr
a4354ccdfb Add config option for length of commit hash displayed in commits view
- Add config option `commitHashLength` to to pkg/config/user_config.go
- Changed the hash display in pkg/gui/presentation/commits.go
2024-04-27 11:30:49 +02:00
oakio
2b5c814080 Add StatusPanelView config 2024-04-10 17:38:57 +02:00
Artem Belyakov
f3dba743f0 Add SpinnerConfig
This new config section allows to customize frames and rate of
thespinner
2024-04-06 13:46:15 +02:00
Stefan Haller
3b29705a78 Add config to truncate commit hashes when copying them to the clipboard
I often copy hashes in the commits panel in order to paste them into Github
comments (or other places), and I can't stand it when they have the full length.

I picked a default of 12 for this; I find this to be a good middle ground
between being reliable in large repos (12 still works in the linux kernel repo
today, but it might not be enough in really huge repos) and not being too ugly
(many smaller repos can probably get away with less).

We deliberately don't change this for the "Copy to clipboard" menu, since this
gives users a way to copy the unabbreviated sha if they need this occasionally.
2024-03-22 09:58:54 +01:00
Stefan Haller
a8797c7261 Default to substring filtering, add option to go back to fuzzy filtering
By default we now search for substrings; you can search for multiple substrings
by separating them with spaces. Add a config option gui.filterMode that can be
set to 'fuzzy' to switch back to the previous behavior.
2024-03-17 11:55:09 +01:00
Abhishek Keshri
744519de60 Add a commit menu to the commit message panel
And move the "switch to editor" command into this menu. So far this is the only
entry, but we'll add another one in the next commit.
2024-03-11 09:18:40 +01:00
Abhishek Keshri
e1b341e174 Make keybindings for the "Amend attribute" menu configurable 2024-03-11 09:18:40 +01:00
Stefan Haller
cede021400 Add config for soft-wrapping the commit message body 2024-03-09 10:00:44 +01:00
Alex March
e354a9bb48 Deprecate git.log.showGraph and git.log.order config
Added identical properties to AppState that should eventually have their defaults set.
2024-02-16 13:23:35 +01:00
Stefan Haller
b1d05b6371 Change default of git.log.showGraph to 'always'
Most people seem to prefer it to be on.
2024-02-13 14:34:40 +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
Jesse Duffield
53a8bd2e3f Add ability to start an interactive rebase onto an appropriate base
A common issue I have is that I want to move a commit from the top of my branch
all the way down to the first commit on the branch. To do that, I need to navigate
down to the first commit on my branch, press 'e' to start an interactive rebase,
then navigate back up to the top of the branch, then move my commit back down to
the base. This is annoying.

Similarly annoying is moving the commit one-by-one without explicitly starting
an interactive rebase, because then each individual step is its own rebase which
takes a while in aggregate.

This PR allows you to press 'i' from the commits view to start an interactive
rebase from an 'appropriate' base. By appropriate, we mean that we want to start
from the HEAD and stop when we reach the first merge commit or commit on the main
branch. This may end up including more commits than you need, but it doesn't make
a difference.
2024-01-13 12:57:49 +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
Stefan Haller
a6174271aa Update cheat sheets and json schema 2024-01-09 14:27:33 +01:00
Alex March
3fe491fcb2 Implement a sort order menu for remote branches 2023-12-22 16:30:20 +09:00
Emre Deger
79e04fad9a
fix(config): add yaml struct tag to CustomCommandPrompt.[]Options
add `yaml` struct tag for fixing uppercase issue on json schema
2023-12-15 07:29:48 +03:00
AzraelSec
6907816af9 chore: update jsonschema 2023-12-07 08:30:03 +01:00
Karim Khaleel
1a035db4c8 Add UserConfig jsonschema generation script 2023-12-02 10:46:24 +01:00