1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-04-19 17:02:18 +03:00

398 Commits

Author SHA1 Message Date
Stefan Haller
80b5e21bd5 Add a command to select all commits of the current branch
This is useful for seeing the combined diff of all commits of a branch.
2025-04-10 09:02:09 +02:00
Stefan Haller
dc48cf963a Add config os.shellFunctionsFile 2025-04-07 14:35:40 +02:00
Stefan Haller
41e9335ea8 Reorder configs in OSConfig
There is a section at the end with deprecated settings, and a comment saying
"The following configs are all deprecated". The clipboard-related settings were
accidentally added to that section; they are not deprecated, so move them up to
before that section.
2025-04-07 14:35:40 +02:00
hasecilu
8ec37f80b7 Let users to define custom icons and color for files on the config file
Co-authored-by: Stefan Haller <stefan@haller-berlin.de>
2025-03-25 09:48:12 +01:00
Karim Khaleel
a64c32d431 Add in missing "deprecated" yaml tags 2025-03-23 12:45:34 +01:00
Stefan Haller
0c9154ca9d Add comments with more information
This will be useful in the next commit when these start to show up in the
generated Config.md.
2025-03-22 12:35:24 +01:00
Stefan Haller
95c5d51e64 Support home and end as alternatives to '<' and '>' 2025-03-17 19:58:01 +01:00
rako
f989425f8c Add acme editor preset 2025-03-06 15:02:53 +01:00
Stefan Haller
df17896de5 Validate properties of customCommand when commandMenu is used 2025-02-28 10:11:30 +01:00
Stefan Haller
22512d55a8 Add commandMenu property to custom commands 2025-02-28 10:11:30 +01:00
Stefan Haller
e799976b8a Extract a method CustomCommand.GetDescription
We'll reuse it in the next commit.
2025-02-28 10:00:59 +01:00
Stefan Haller
f93948cb23 Change customCommand fields to pointers
This allows us to tell whether they appear in the user's config file, which we
will need later in this branch.
2025-02-28 10:00:59 +01:00
Chris McDonnell
d39f883b4e Migrate to only doing marshalling twice, and compare via deep copy 2025-02-27 17:05:31 -05:00
Chris McDonnell
a01ca19bb3 Set up benchmark on migration 2025-02-27 12:38:21 -05:00
Stefan Haller
3b85307f67 Filter out [dev] comments when generating config doc 2025-02-23 20:55:28 +01:00
Chris McDonnell
72b9e8328d Make commit prefixes migration only return true if it enters if statement 2025-02-23 19:01:03 +01:00
Stefan Haller
38ab7ebefb Change TestCommitPrefixMigrations to compare only strings 2025-02-23 18:59:37 +01:00
Stefan Haller
4b30bc6dd3 Change test to use named struct fields instead of positional fields
This makes the tests a little bit easier to read, the multi-line string literals
make this otherwise a little difficult.
2025-02-23 18:59:37 +01:00
Stefan Haller
5979b40546 Validate keys of custom commands 2025-02-21 13:20:53 +01:00
Stefan Haller
a5f78d3222 Validate that Universal.JumpToBlock array has 5 elements
The code that uses this panics if it has fewer.
2025-02-21 13:20:53 +01:00
Stefan Haller
f3791e6ab6 Validate keybindings 2025-02-21 13:20:53 +01:00
Stefan Haller
130801dbf6 Add a few missing keybindings to docs/keybindings/Custom_Keybindings.md 2025-02-21 13:20:33 +01:00
Stefan Haller
67bb7f62c5 Move labelByKey to config package 2025-02-21 13:20:33 +01:00
Stefan Haller
11616190ee Add a gui.tabWidth config
Affects everything that is shown in the main view, but probably mostly relevant
for diffs.
2025-02-20 09:13:56 +01:00
Adrian Gielniewski
e3944c1707 Fix description of showFileTree
Change '~' to '`' as it's the correct key.

Signed-off-by: Adrian Gielniewski <adrian.gielniewski@gmail.com>
2025-02-17 20:14:11 +01:00
Chris McDonnell
2fa4ee2cac feat: Support multiple commit prefixes
This implementation, unlike that proposed in https://github.com/jesseduffield/lazygit/pull/4253
keeps the yaml schema easy, and does a migration from the single
elements to a sequence of elements.
2025-02-17 19:58:31 +01:00
Stefan Haller
19921b7c42 Fix json schema for context of CustomCommand
Previously the schema only allowed a single value; however, it is now possible
to specify multiple values separated by comma, and you would get very ugly red
error squiggles in VS Code when you did that.

The only solution that I can see is to get rid of the "enum" specification, and
mention the valid values only in the description. Add examples too so that you
get at least auto-completion.
2025-02-12 08:18:26 +01:00
Karem Abdul-Samad
afc3061c51 Improve error reporting on config migration 2025-01-30 09:01:17 +01:00
Mauricio Trajano
7bea41534b Collapse/expand all files in tree
Co-authored-by: Stefan Haller <stefan@haller-berlin.de>
2025-01-13 21:13:11 +01:00
Mauricio Trajano
c64a7904b7 Add ability to configure branch color patterns 2025-01-12 13:44:26 +01:00
Jesse Duffield
28d10c26a4 Standardise on 'screen mode' name
We had some conflicting names so we're standardising on screen mode
2025-01-11 14:25:48 +11:00
Nikita Karamov
2b3525bfd6 Fix micro editor preset 2025-01-09 08:48:59 +01:00
Stefan Haller
15288b7bf4 Add user config to enable line wrapping in the staging view
It is enabled by default, because I think it's often helpful, and rarely in the
way. I bet most user won't even notice.
2024-12-23 12:24:09 +01:00
Sergey Kochetkov
93a37cf83e
fix(config): allBranchesLogCmd description typo 2024-12-18 11:42:50 +01:00
johannaschwarz
f455f99705 Add user config gui.showNumstatInFilesView
When enabled, it adds "+n -m" after each file in the Files panel to show how
many lines were added and deleted, as with `git diff --numstat` on the command
line.
2024-12-08 12:09:47 +01:00
Baptiste Ottino
1543b83d10 Fix opening links containing ampersands (&) in WSL
Opening links containing ampersands inside lazygit (a pull-request
creation page in BitBucket Server, for instance) returns the following
Powershell error:
> The ampersand (&) character is not allowed. The & operator is reserved
> for future use; wrap an ampersand in double quotation marks ("&") to
> pass it as part of a string.

We fix it by enclosing the URL in single quotes.
2024-12-04 09:43:30 +01:00
Baptiste Ottino
4cfeb18632 Fix opening files with explorer in WSL
The OS command to open file in explorer in WSL doesn't currently work as
expected; it always opens the file explorer at the default opening
location. This is because the {{filename}} variable returns the path in
WSL format, and not in the format expected by Windows.

We use wslpath, a utility shipped with WSL, to make the path conversion.
2024-12-04 09:43:30 +01:00
LU Jialin
111407d9a6 use an unsigned_64 for DiffContextSize and add saturated add/subtract 2024-11-19 08:21:19 +11:00
Harris Greenstein
8da43af924 Add config option to disable tab switching with jump keys 2024-11-09 17:19:14 +11:00
Stefan Haller
0e489bb5cc Add options for disabling switching to the Files panel after popping or applying a stash 2024-09-15 11:59:59 +02:00
Dmytro Suvorov
da7a28c117 Add Zed to user_config.go and schema 2024-09-03 19:22:56 +02:00
Dmytro Suvorov
f0eafabd6d
Add Zed support to editor_presets.go 2024-09-03 17:30:56 +03:00
Stefan Haller
90b8fd242d Add config git.autoStageResolvedConflicts 2024-09-02 18:12:47 +02:00
Stefan Haller
30f43a245b Fix loading customCommands from per-repo config file
Any newly loaded custom command coming from the per-repo config file should add
to the global ones (or override an existing one in the global one), rather than
replace all global ones.

We can achieve this by simply prepending the newly loaded commands to the
existing ones. We don't have to take care of removing duplicate key assignments;
it is already possible to add two custom commands with the same key to the
global config file, the first one wins.
2024-08-24 11:01:25 +02:00
Stefan Haller
ce50533689 Reload changed user config files on terminal focus 2024-08-18 10:24:53 +02:00
Stefan Haller
74ed1ac584 Support per-repo config files
For now we only support .git/lazygit.yml; in the future we would also like to
support ./.lazygit.yml, but that one will need a trust prompt as it could be
versioned, which adds quite a bit of complexity, so we leave that for later.

We do, however, support config files in parent directories (all the way up to
the root directory). This makes it possible to add a config file that applies to
multiple repos at once. Useful if you want to set different options for all your
work repos vs. all your open-source repos, for instance.
2024-08-18 10:24:52 +02:00
Stefan Haller
f114321322 Save changed user config back to disk in integration tests
At the moment, the user config is only read once at startup, so there's no point
in writing it back to disk. However, later in this branch we will add code that
reloads the user config when switching repos, which does happen quite a bit in
integration tests; this would undo the changes that a test made in its
SetupConfig function, so write those changes to disk to prevent that from
happening.
2024-08-18 10:24:52 +02:00
Stefan Haller
940700dc56 Introduce ConfigFile struct
This makes it more explicit how to deal with the different types of config
files: a user-supplied config file (via the LG_CONFIG_FILE env var) is required
to exist, whereas the default config file will be created if it is missing.

We will later extend this with repo-specific config files, which will be skipped
if missing.
2024-08-18 10:24:52 +02:00
Stefan Haller
cd0f72d66a Remove pointless reloading of UserConfig
It was added in 043cb2ea44, and the commit message was "reload config whenever
returning to gui". I don't understand what this means; Run() is called exactly
once after startup, so it would just reload the config again for no reason.

We will add a real way of reloading the config whenever it has changed later in
this branch.
2024-08-18 10:24:52 +02:00
Stefan Haller
48bb3a9dce Make fields of AppConfig private
We are going to make a few changes to the fields in this branch, and we can make
them with more peace of mind when we can be sure they are not accessed from
outside this package.
2024-08-18 10:24:52 +02:00