Commit graph

512 commits

Author SHA1 Message Date
Ching Pei Yang 7cef4f4e33 Change log path to state dir 2024-02-18 15:36:56 +01:00
Ching Pei Yang 2c0520bc4b Use $XDG_STATE_DIR for state.yml 2024-02-18 15:36:56 +01:00
Ching Pei Yang 2118ecdf8e Switch to github.com/adrg/xdg 2024-02-18 15:36:56 +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 517e0f8248 Add command to open git difftool 2024-01-09 14:27:33 +01:00
Alex March 36a29f225b Add a sort order menu for local branches 2023-12-27 15:25:29 +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 c7012528fc feat: introduce a copy menu into the file view 2023-12-07 08:30:03 +01:00
Karim Khaleel 1a035db4c8 Add UserConfig jsonschema generation script 2023-12-02 10:46:24 +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
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 DeLosSantos 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
Jesse Duffield b2eccd6fe8 Add comments in user config struct
We're going to make this user config struct a more authoritative source of truth.

Some of these fields weren't actually explained anywhere so I've added explanations.

In places where a lot of explanation is required I've linked to existing explanations in other docs.
2023-09-30 19:23:52 +10: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é Solano 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
Stefan Haller f7db17f7d0 Load defaults for AppState before reading from yaml
So far this hasn't been necessary because all defaults were zero values. We're
about to add the first non-zero value though, and it's important that it is
initialized correctly for users who have a state.yml that doesn't have it yet.
2023-09-04 17:50:49 +02:00
Stefan Haller 6266e19623 Add support for external diff commands (e.g. difftastic) 2023-09-04 16:52:30 +02:00
Mark Skelton 6dc34d19ea
Support custom keybindings for confirm discard 2023-08-25 08:50:05 -05:00
Stefan Haller 61bd3e8dd2 Add key binding for switching from the commit message panel to an editor
This is useful for when you begin to type the message in lazygit's commit panel,
and then realize that you'd rather use your editor's more powerful editing
capabilities. Pressing <c-o> will take you right there.
2023-08-21 10:03:34 +02:00
Stefan Haller b2d629b50a Add scrollOffEnabled config 2023-08-21 09:03:45 +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 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 c92ed07082 Appease linter 2023-08-02 08:32:57 +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 be667682f0 Move IgnoreWhitespaceInDiffView to AppState, and persist it when it changes 2023-07-31 11:41:55 +02:00
Stefan Haller 66de981e91 Add a "Mark commit as base commit for rebase" command
This allows to do the equivalent of "git rebase --onto <target> <base>", by
first marking the <base> commit with the new command, and then selecting the
target branch and invoking the usual rebase command there.
2023-07-31 08:41:41 +02: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 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
Jesse Duffield 18ea68c23a Support creating worktrees from refs 2023-07-30 18:35:22 +10:00
Jesse Duffield f17417219a
feat: add os.copyToClipboardCmd to allow for a custom command #1055 (#2784) 2023-07-29 19:35:52 +10:00
Red S 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
hatredholder 75674d819c bring back yaml library fork 2023-07-26 12:50:39 +03:00
Scott Callaway 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 b61ca21a84 Allow checking for merge conflicts after running a custom command
We have a use-case to rebind 'm' to the merge action in the branches panel. There's three ways to handle this:
1) For all global keybindings, define a per-panel key that invokes it
2) Give a name to all controller actions and allow them to be invoked in custom commands
3) Allow checking for merge conflicts after running a custom command so that users can add their own 'git merge' custom command
that matches the in-built action

Option 1 is hairy, Option 2 though good for users introduces new backwards compatibility issues that I don't want to do
right now, and option 3 is trivially easy to implement so that's what I'm doing.

I've put this under an 'after' key so that we can add more things later. I'm imagining other things like being able to
move the cursor to a newly added item etc.

I considered always running this hook by default but I'd rather not: it's matching on the output text and I'd rather something
like that be explicitly opted-into to avoid cases where we erroneously believe that there are conflicts.
2023-07-13 18:40:34 +10: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
Stefan Haller 2f6b7b9bc3 Rename the gui.skipUnstageLineWarning conf key to gui.skipDiscardChangeWarning 2023-06-26 08:19:58 +02: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
Enrico Borba cbbb281011
kakoune binary name 2023-06-05 08:53:39 -04: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 cc0edd42bb
Merge pull request #2508 from Ryooooooga/remove-jesseduffield-yaml 2023-05-30 17:39:25 +10:00
Jesse Duffield 036a1ea519 Support suggestions generated from command in custom commands
This changes the interface a bit but it was only added earlier today so I doubt anybody is dependent on it yet.

I'm also updating the docs.
2023-05-29 22:47:35 +10:00
Jesse Duffield 16fa22a36e Add suggestionsPreset to custom commands system 2023-05-29 14:24:49 +10: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
Jesse Duffield 9c384c5267 Clean up helix editor preset 2023-05-26 09:19:12 +10:00
Jesse Duffield e5534d9781
Merge pull request #2668 from dvic/add-helix-support 2023-05-25 19:59:14 +10:00
Jesse Duffield e0ecc9e835 Allow global logging when developing
I'll be honest, for all I know logging should be global in general: it is
a pain to pass a logger to any struct that needs it. But smart people on the
internet tell me otherwise, and I do like the idea of not having any global
variables lying around.

Nonetheless, I often need to log things when locally debugging and that's a
different kind of logging than the kind you would include in the actual
released binary. For example if I want to log something from gocui, I would
rather not have gocui depend on lazygit's logging setup.
2023-05-25 18:31:32 +10:00
dvic ed496deeca
Add helix editor preset 2023-05-24 23:08:26 +02: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
Jesse Duffield 3cac14c76e add comment to encourage keeping code and docs in sync 2023-05-04 16:53:13 +10:00
Stefan Haller 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
Sean 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
J. B. Rainsberger 6c010a788c
Add an editor preset for kakoune (kakoune.org). 2023-04-27 13:41:54 -03:00
Stefan Haller e4e16fa38e Change OpenCommand to Open and OpenLinkCommand to OpenLink
We do this for consistency with the edit settings. The old names are kept as a
fallback for now.
2023-04-13 13:14:00 +02:00
Stefan Haller b7e029adc7 Don't set platform defaults on OSConfig struct immediately
Instead, query the platform defaults only if the config is empty. This will be
necessary later to distinguish an empty config from a default config, so that we
can give deprecation warnings.
2023-04-13 13:14:00 +02:00
Stefan Haller 659d668e16 Implement edit presets 2023-04-13 13:14:00 +02:00
Stefan Haller 7bbcec965b Cleanup: fix copy/paste error in comment 2023-04-13 13:14:00 +02:00
Jesse Duffield a82d952f48
Merge pull request #2495 from jesseduffield/feature/remove-altreturn 2023-03-20 20:11:35 +11:00
yk-kd b5d612e6d6
Add border config (#2344)
Co-authored-by: yk-kd <yosuke.komada@gmail.com>
2023-03-18 11:23:31 +11:00
Ryooooooga 33f332e28d
build: remove github.com/jesseduffield/yaml package 2023-03-17 23:19:11 +09:00
Luka Markušić f314cb3763 Remove alternative confirmation and return keymappings 2023-03-09 10:32:00 +01:00
Humble Penguin dfe5c805c4 generated cheatsheets and ran code formatting 2023-03-05 07:06:34 +05:00
Humble Penguin e94ff63bc5 issue #2473 2023-03-05 06:47:21 +05:00
Jesse Duffield 56424eb1aa remove x keybinding for opening menu so we now only use '?' 2023-02-20 19:28:45 +11:00
Jesse Duffield 0b55eaca1d add create tag from commit test 2023-02-20 19:01:08 +11:00
Ryooooooga 67b08ac239
feat: support to create tag on branch 2023-02-19 23:31:46 +09:00
Jesse Duffield bff076c70a rename key to Pull 2023-02-19 11:42:00 +11:00
Phanindra kumar Paladi 35c5f940a4 Fixing indent in user_config.go 2023-02-01 09:50:37 +05:30
Phanindra Kumar Paladi 01f0efb997
Merge branch 'master' into #2319_default_screen_mode 2023-01-29 10:25:14 +05:30
stk 67fb28e2b8 Add user config gui.skipRewordInEditorWarning 2023-01-26 09:01:22 +01:00
Phanindra kumar Paladi a11e91e651 replaced 'screenMode' to 'windowSize' in config 2023-01-16 20:07:21 +05:30
Phanindra kumar Paladi f4ccb68464 Added screenMode configuration to gui configuration 2023-01-11 16:51:46 +05:30
Ryooooooga 965f7bfcb2
feat(config): change git.commit.verbose to accept "default" 2023-01-06 11:15:33 +09:00
Paul Horn d98130c3ef
Add option to allow --verbose commit in editor commits 2023-01-01 02:01:04 +01:00
Jesse Duffield f3fa9ec2d1
Merge pull request #2311 from wakaka6/add_return_alt1 2022-12-28 11:54:16 +11:00
Ryooooooga ac127f017e
chore(config): remove unused config 2022-12-26 16:14:30 +09:00
wakaka6 b6c73b3620 Change null as the default return-alt1 2022-12-20 21:39:24 +08:00
wakaka6 6386a03805 add return alt1 2022-12-11 15:44:25 +08:00
Jesse Duffield 65d6d7fb2d fix ignore file keybinding 2022-11-30 19:36:35 +11:00
Arnaud PERALTA 37997dcbcd [#2279] defaultFgColor entry in theme config 2022-11-21 21:48:18 +01:00
Jesse Duffield 1ac3ae1ad1 use better colour defaults 2022-11-12 14:59:15 +11:00
Ryooooooga 11316b7a48
feat: add rename stash 2022-10-16 09:12:42 +09:00
Jesse Duffield fd66499c8f
Merge pull request #2167 from xiaoliwang/remove_deprecated 2022-09-23 23:01:40 -07:00
jiepeng b8900baf1a remove deprecated calls 2022-09-17 15:10:41 -07:00
Mihai22125 7e9dffe1b9 Add Key field to CustomCommandPrompt struct
Add Form field to CustomCommandObjects struct

Write user prompts responses to Form field

Ensure that map keys exists

Add form prompts integration test

Remove redundant index
2022-09-17 14:58:44 -07:00
Jesse Duffield 9c0d860980 basic custom command test 2022-08-14 20:49:20 +10:00
Jesse Duffield 46ae55f91e introduce gui adapter 2022-08-13 13:51:56 +10:00
Jesse Duffield 86ac309e08 add build info when building from source 2022-08-01 20:16:50 +10:00
sportshead e1f41b653c Add showOutput option to custom commands (#1163) 2022-07-28 18:40:30 +08:00
Jesse Duffield c087dca60a
Merge pull request #2027 from jesseduffield/gozes-jesse
Attempt at fixing CI
2022-07-05 19:37:09 +10:00
Juan Sanchez Montalvo 11d766053e Allow adding a file to the .git/info/exclude file 2022-07-05 19:33:44 +10:00
Jesse Duffield 39ba397cf7 Update pkg/config/user_config.go 2022-07-04 11:36:18 -07:00
Michael Mead 9d304098bb feat: add confirm prompt for custom keybindings
- Supports configuring a custom confirmation prompt via `config.yml` for
  custom keybindings. A new `CustomCommandPrompt.Body` field is
  used to store the immutable body text of the confirmation popup.
- Adds a sample 'confirm' prompt to the example `config.yml`.
- Updates the `Prompts` section of the documentation to include
  'confirm' prompt type and also describe which fields pertain to it
  (i.e. `initialValue`).

Closes: https://github.com/jesseduffield/lazygit/issues/1858

Signed-off-by: Michael Mead <mmead.developer@gmail.com>
2022-07-04 11:36:13 -07:00
John Shin 1eb47deae4 apply gofumpt 2022-07-03 02:00:40 -07:00
John Shin 4d54b3801f apply formatting 2022-06-11 23:23:22 -07:00
John Shin 3067c2c321 support open file and link on WSL 2022-06-11 23:18:29 -07:00
Jesse Duffield 36aa01c3ac
Merge pull request #1970 from mark2185/fix-helpful-unmarshall-error 2022-06-11 09:19:30 +10:00
Luka Markušić abf203e012
Update pkg/config/app_config.go
Print out error to narrow down the search

Co-authored-by: Ryoga <eial5q265e5+github@gmail.com>
2022-05-31 13:28:24 +02:00
Lay 684ea284af fix: lint error 2022-05-30 23:19:48 +08:00
Lay 666180cfd0 Add config param that displays the whole git graph by default 2022-05-30 13:52:39 +08:00
Luka Markušić abeb03b090 Add helpful message on unmarshall error 2022-05-28 17:29:30 +02:00
Ryooooooga 1f1d871837
feat: add ability to customize time format 2022-05-18 20:55:27 +09:00
HiromasaNojima 1ef585969f add option to always show unstaged/staged panels 2022-05-08 17:24:55 +09:00
Jens Pfeifle 7c573a5bea Add command to reset the commit author from the commits panel. 2022-05-08 13:29:56 +10:00
Jesse Duffield cf80978f15
Merge pull request #1918 from RhydianJenkins/name-bug-fix 2022-05-07 11:02:24 +10:00
Rhydian Jenkins 7d495573ab Bug fix - unused name param 2022-05-06 23:00:44 +01:00
Ryooooooga d458e78d95
feat: add ability to edit hunk 2022-05-06 21:53:00 +09:00
Jesse Duffield d85f4792af
Merge pull request #1894 from Ryooooooga/feature/icons 2022-05-01 12:21:32 +10:00
Ryooooooga e5730cb80b
fix: improve default editCommandTemplate 2022-04-23 17:39:12 +09:00
Ryooooooga b07aeda5a6
feat(gui): show file icons 2022-04-23 12:25:40 +09:00
Jesse Duffield 9b947b74a2 allow hiding bottom line 2022-04-18 09:58:36 +10:00
Jesse Duffield 6a153acc8f clearer highlighting of current line 2022-04-16 15:19:32 +10:00
casswedson b7928042f0 chore: typo hunting ft. codespell 2022-04-06 08:52:41 +10:00
Ryooooooga 86c259623c feat: fix permission problem of temp dirs 2022-04-02 08:48:38 +11:00
Moritz Haase 240483953f config: Add option 'git.autoRefresh' to en-/disable auto-refresh
Adds a new 'autoRefresh' option to the 'git' config section that allows user to
disable auto-refresh (defaults to on). If auto-refresh is enabled, the
refreshInterval is now checked before starting the timer to prevent crashes when
it is non-positive.

Fixes #1417
2022-03-27 10:14:33 +11:00
Luka Markušić 540edb0bf4 Add copy commit attributes option 2022-03-26 17:22:42 +11:00
Jesse Duffield a34bdf1a04 update linters 2022-03-19 12:12:57 +11:00
Ram Bhosale 7be25a105d allow skipping confirmation prompt after opening subprocess 2022-03-17 17:52:31 +11:00
Jesse Duffield 11acac0091 more explicit 2022-03-16 19:55:58 +11:00
Daniel Kiss f5a5b7f966 Add unstagedChangesColor config option 2022-03-16 19:21:39 +11:00
Matt Cles 4df7646654 Add configurable colors for branch prefixes
Branches can now be colored based on their prefix, if it matches
a user defined prefix in the config file. If no user defined
prefix matches, then it will fallback to the defaults: green for
'feature', yellow for 'bugfix', and red for 'hotfix'. All
remaining branches will be set to the default text color.
2022-02-01 18:55:45 +11:00
Jesse Duffield 14b9a0b647 stop skipping stash warnings 2022-01-24 19:18:09 +11:00
Jesse Duffield 4ab5e54139 add support for git bisect 2022-01-22 10:48:51 +11:00
Jesse Duffield 192a548c99 refactoring the config struct 2022-01-04 09:07:15 +11:00
Jesse Duffield 01ea5813a8 align Gui struct with GitCommand 2022-01-04 09:07:15 +11:00
Jesse Duffield 03b946cc8f no more config in git command struct 2022-01-04 09:07:15 +11:00
Jesse Duffield f89747451a allow opening a commit in the browser 2021-12-29 09:01:06 +11:00
Mark Sagi-Kazar b4ea565c99 add signoff config
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
2021-12-25 12:01:55 +11:00
Jesse Duffield 1996eddd91 more efficient context diff size changing 2021-12-06 22:37:28 +11:00
DerTeta f7ffbbd72a Add a menu entry and keybinding to { for decreasing the context size 2021-12-06 22:37:28 +11:00
DerTeta 0fbde05928 Add a menu item and keybinding to } to increase the context size 2021-12-06 22:37:28 +11:00
DerTeta 9feaf5d70f Add the DiffContextSize setting to GitConfig
It defaults to 3 lines, which is the default value for git.
2021-12-06 22:37:28 +11:00
Jesse Duffield ccd80a0e4b add menu options for log stuff 2021-11-05 07:58:21 +11:00
Jesse Duffield 37be9dbea1 support scrolling left and right 2021-11-05 07:58:21 +11:00
Jesse Duffield f6ec7babf5 add some config 2021-11-05 07:58:21 +11:00
Jesse Duffield c47c539e12 support user-configurable author colours 2021-10-30 18:26:06 +11:00
Jesse Duffield 3eb124c732 easier hiding of command log 2021-10-23 12:54:57 +11:00
Jesse Duffield ef544e6ce9 add more suggestions 2021-10-23 12:29:52 +11:00
Jesse Duffield 5011cac7ea show filetree by default 2021-10-22 22:39:17 +11:00
Sam Burville f6e316dfe5 Improve JumpToBlock keybinding functionality
Improve experience when yaml file has != 5 keybindings and change view
helper to use the length of the array instead of hardcoded value.
2021-10-22 22:38:26 +11:00
Sam Burville 91e8765d9c Add JumpToBlock keybinding
This should allow users to decide their own keybinding for jumping
between blocks/panels.
E.g. A user could choose 5-9 instead of 1-5.
2021-10-22 22:38:26 +11:00
Jesse Duffield 6388af70ac simplify pull logic 2021-10-22 21:33:17 +11:00
Ryooooooga 7b615e3186 Fix open link command in Windows 2021-10-16 22:40:50 +11:00
Jesse Duffield 3621084096 small changes 2021-10-16 12:22:34 +11:00
Jesse Duffield 8c25aaa687 extra comment 2021-10-16 12:22:34 +11:00
Jesse Duffield d02e52989e small changes 2021-10-16 12:22:34 +11:00
mjarkk 913a2fd065 Allow having multiple config files 2021-10-16 12:22:34 +11:00
Sam Burville 268d4080b3 Fix text formatting 2021-09-30 01:26:05 +10:00
Sam Burville 5c57c973d6 Tidy of spacing on GetDefaultConfig in user_config 2021-09-30 01:26:05 +10:00
Sam Burville c5f7ad5adb Make cherry pick commit color customisable
Two new settings in the config, which allow the cherry picked
foreground and background to be custom colors.

Issue #856
2021-09-30 01:26:05 +10:00
Ryooooooga 663c036ca5 Save patch files in TempDir 2021-09-29 22:05:58 +10:00
black_desk 66d0fd2133 Format code to pass lint 2021-09-16 21:38:43 +08:00
Dwarven YANG 63072af5bc allow user to configure the gui language 2021-08-30 09:12:29 +10:00
Liberatys 2dc6f5f079 Implement state filtering for commit files 2021-08-25 20:13:50 +10:00
Ryooooooga 51f05ce08b
Fix open command in Windows 2021-08-23 21:21:34 +09:00
Mark Kopenga 487ad196a7
Merge pull request #1413 from Ryooooooga/feature/edit-line
Make os.editCommand customizable using template
2021-08-23 10:15:38 +02:00
Elwardi 906ec30cac Minor changes to menuFromCommand prompts 2021-08-06 10:53:32 +01:00
Elwardi a8ec044f0e Make menuFromCommand format menu items and their description 2021-08-05 15:45:18 +01:00
Ryooooooga ac609bd37c
fix backward compatibility 2021-08-04 18:43:34 +09:00
Ryooooooga 4f66093335
introduce edit command template to open a specifig line of a file 2021-08-03 21:42:14 +09:00
Denis Palashevskii 0e6598adbd Implement pull request options menu 2021-07-27 21:30:08 +10:00
Elwardi f1ced5539a Add option to format filter matches to menuFromCommand prompts 2021-07-19 11:46:29 +01:00
Elwardi 77e9ee64a4 Apply suggestions from @mjarkk for menyFromCommands 2021-07-18 18:42:42 +01:00
Elwardi d18c8c8dc3 Add prompt type: menuFromCommand 2021-07-18 10:36:00 +01:00
mjarkk fc066d2f2e parse github emoji config option 2021-07-16 14:06:01 +02:00
Davyd McColl 3dc3174d85 🔥 remove erroneous user_config fields 2021-07-01 17:13:14 +10:00
Davyd McColl 16dcc8f4db implement feedback when toggling whitespace 2021-07-01 17:13:14 +10:00
Davyd McColl a9f04d3925 facilitate toggling whitespace in the diff view with a hotkey (c-w by default) 2021-07-01 17:13:13 +10:00
Emiliano Ruiz Carletti c57a0077d0 Read pull mode from gitconfig lazily 2021-06-15 08:31:07 +10:00
Emiliano Ruiz Carletti 46e500dc28 Revert "Read pull mode from git configuration"
This reverts commit e69e240a31.
2021-06-15 08:31:07 +10:00
Emiliano Ruiz Carletti d7865b3882 Read pull mode from git configuration 2021-06-15 08:31:07 +10:00
Jesse Duffield ce7cbe58a0 naming change 2021-06-14 18:17:08 +10:00
Andrei Yangabishev 7588d5290b ShowTotal flag 2021-06-10 12:43:05 +03:00
caojoshua 60468d2e17 Edit command as user OS config option 2021-06-05 10:58:09 +10:00
Robert Verst cb78cf7de4 Simplify sorting of git tags by using git's functions 2021-06-05 10:56:46 +10:00
Robert Verst 94b52af661 Remove config, make default sort order descending 2021-06-05 10:56:46 +10:00
Robert Verst 472288c81b Add user config to change the sort order of tags 2021-06-05 10:56:46 +10:00
Liberatys 44f7fc6f7c Add global binding to open recent repos 2021-05-30 13:25:44 +10:00
Jesse Duffield 4fb2dba587 allow hiding random tip 2021-04-12 21:48:08 +10:00
Jesse Duffield 3b7e7a7f56 add random tip to command log 2021-04-12 21:48:08 +10:00
Jesse Duffield 06a8eb115c make command log size configurable 2021-04-11 23:36:34 +10:00
Jesse Duffield 393ce05860 allow focusing on command log view 2021-04-11 17:07:49 +10:00
Jesse Duffield 4f03d7733a allow showing, hiding, and scrolling the extras panel 2021-04-11 17:07:49 +10:00
Jesse Duffield 9f4433d8b5 allow opening merge tool 2021-04-11 10:21:53 +10:00
Jesse Duffield 43a9dc48e0 default to not quitting when hitting esc at the top level.
I've been using this config option for years now so I don't think much of it,
but newcomers are going to find it annoying that hitting escape gets you out
of filtering/cherry-picking/patch-building mode, but also quits the app. So
if you want to exit all the modes you're in, you need to take care not to
press the key one too many times or the app will close.

We'll see if anybody gets mad about this change, but I think it's reasonable.
The only downside is that you won't be able to always quit by spamming the escape
key. If you're in a prompt panel, you'll need to hit escape to exit that, and
then 'q' at the top level. Or CTRL+C of course.
2021-04-06 19:34:32 +10:00
Jesse Duffield 1a5f380c00 support alt-enter for inserting newline when typing commit message within the app 2021-04-06 19:34:32 +10:00
Jesse Duffield 6fc3c03c4b allow configuring to show file tree on startup 2021-03-30 21:57:00 +11:00
Jesse Duffield da6fe01eca allow toggling on/off file tree mode 2021-03-30 21:57:00 +11:00
Jesse Duffield 043cb2ea44 reload config whenever returning to gui 2021-02-24 02:45:05 -08:00
Nick Flueckiger 6f0f70bd92 Adding setup and config 2021-02-08 14:25:24 -08:00
Yuki Osaki 4928d1d490 Visualize the commits for all branches 2020-11-28 19:19:47 +11:00
Kalvin Pearce d468866746 Add config option for notInRepo behaviour. 2020-11-28 10:51:34 +11:00
Nick Flueckiger 7513bfb13a Implement suggestions 2020-11-28 10:42:38 +11:00
Nick Flueckiger 1f27002b84 Switch the directory check 2020-11-28 10:42:38 +11:00
Nick Flueckiger 669bfe763a A small change that enables direct lazygit directory config 2020-11-28 10:42:38 +11:00
Davyd McColl 26d5444919 implement quick commit when no files staged, if configured to do so 2020-11-28 10:27:28 +11:00
Farzad Majidfayyaz 74bb6f0012 Change copy PR mapping to <c-y> and use gui.Tr for the message 2020-11-19 09:43:51 +11:00
Farzad Majidfayyaz 79888d3bde Add mapping to copy a pull request URL to the clipboard 2020-11-19 09:43:51 +11:00
Jesse Duffield b1dd3c4866 support rebinding confirm/newline keys in editor 2020-10-13 08:21:09 +11:00
nullawhale 1ff405edd8 Copy a commit message to clipboard: Changes to latest version 2020-10-12 21:04:01 +11:00
Jesse Duffield 1e79ab78dd return default config when dealing with read only filesystem rather than create new config file 2020-10-12 08:48:28 +11:00
Jesse Duffield 485f6d5386 support configurable config 2020-10-10 00:23:01 +11:00
Jesse Duffield 7d9aa97f96 have typed default config 2020-10-10 00:23:01 +11:00
Jesse Duffield ca31e5258f store popup version in state not config so that we never need to write to the user config 2020-10-10 00:23:01 +11:00
Jesse Duffield 4912205adb remove viper
WIP
2020-10-10 00:23:01 +11:00
Jesse Duffield 2dc848506c bulk submodule menu 2020-10-02 08:09:42 +10:00
Jesse Duffield 86dd9d87dd allow updating submodule 2020-10-02 08:09:42 +10:00
Jesse Duffield da3e00823f allow submodule init and show submodule diff with a prefix 2020-10-02 08:09:42 +10:00
Jesse Duffield 1759ddf247 move OS commands into their own package 2020-09-29 20:48:49 +10:00
Jesse Duffield 077f113618 add in-built logging support for a better dev experience 2020-09-26 11:00:50 +10:00
Francisco Miamoto 86f296a898 add config for disabling force pushing 2020-08-31 09:22:39 +10:00
Jesse Duffield afd669194a use clipboard package to handle clipboard stuff 2020-08-26 07:53:43 +10:00
Jesse Duffield 3ebb91c07a better keybinding ('W') for viewing diff 2020-08-24 23:08:05 +00:00
Jesse Duffield 44d8b3e8f3 allow overriding default confirm/escape keybindings 2020-08-17 18:22:57 +10:00
Jesse Duffield 8430b04492 allow configurable main panel split 2020-08-13 21:50:23 +10:00
Jesse Duffield 35b72420ad support accordian mode i.e. expanding focused side panels 2020-08-13 21:50:23 +10:00
Jesse Duffield 8ff74072f8 update config 2020-08-12 18:47:16 +10:00
Jesse Duffield 845c80721f Decouple escaping from quitting
When a user is not entering text into a prompt, the 'q' key should immediately
quit the application. On the other hand, the 'esc' key should cancel/close/go-back
to the previous context.

If we're at the surface level (nothing to cancel/close) and the user hits the
escape key, the default behaviour is to close the app, however we now have a
`quitOnTopLevelReturn` config key to override this.

I actually think from the beginning we should have made this config option
default to false rather than true which is the default this PR gives it,
but I don't want to anger too many people familiar with the existing behaviour.
2020-07-18 20:00:48 +10:00
Randshot 570d27ffaa
Merge branch 'master' into add-overrideGpg-switch
Signed-off-by: Randshot <randshot@norealm.xyz>
2020-07-12 11:47:35 +02:00
Jasper Mendiola e89bf5d06b add oneline-graph 2020-07-10 18:55:00 +10:00
Randshot 65e955c622
add overrideGpg switch, which prevents lazygit from spawning a separate process when using GPG
Signed-off-by: Randshot <randshot@norealm.xyz>
2020-05-30 23:39:07 +02:00
Jesse Duffield 913f17ee3e prevent flicker from bolding background of selected line 2020-05-15 21:12:12 +10:00
Jesse Duffield 267730bc00 standardise how we handle background colours 2020-05-13 21:24:25 +10:00
Glenn Vriesman 1d6eb015c1 fix: fixed yaml typo
Signed-off-by: Glenn Vriesman <glenn.vriesman@gmail.com>
2020-04-22 08:52:08 +10:00
Jesse Duffield f05a5e531e warnings for stash actions 2020-04-20 18:57:08 +10:00
Jesse Duffield 304607ae5d support configurable merge args 2020-04-20 18:40:49 +10:00
Jesse Duffield 2974a57943 support copying stuff to clipboard 2020-04-15 10:44:56 +00:00
Jesse Duffield 647ab9bf0f better keybinding 2020-03-29 18:26:24 +11:00
Jesse Duffield 40fbce91ce add new diff mode
WIP

WIP

WIP

WIP

WIP

WIP

WIP
2020-03-29 18:26:24 +11:00
Jesse Duffield a2790cfe8e rename to filtered mode 2020-03-29 11:37:29 +11:00
Jesse Duffield 624ae45ebb allow scoped mode where the commits/reflog/stash panels are scoped to a file
WIP

restrict certain actions in scoped mode

WIP
2020-03-29 11:37:29 +11:00
Jesse Duffield 229f5ee48c add keybindings for paging in list panels and jumping to top/bottom 2020-03-28 14:02:53 +11:00
Jesse Duffield daecdd7c2b redoing 2020-03-25 09:39:04 +11:00
Jesse Duffield 8fbcc36331 allow resetting cherry picked commits selection 2020-03-19 21:42:21 +11:00
Jesse Duffield 1be0ff8da7 better upstream tracking and allow renaming a branch 2020-03-18 21:29:06 +11:00