Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions docs/Config.md
Original file line number Diff line number Diff line change
Expand Up @@ -303,9 +303,6 @@ git:
# ydiff -p cat -s --wrap --width={{columnWidth}}
pager: ""

# If true, Lazygit will use whatever pager is specified in `$GIT_PAGER`, `$PAGER`, or your *git config*. If the pager ends with something like ` | less` we will strip that part out, because less doesn't play nice with our rendering approach. If the custom pager uses less under the hood, that will also break rendering (hence the `--paging=never` flag for the `delta` pager).
useConfig: false

# e.g. 'difft --color=always'
externalDiffCommand: ""

Expand Down
14 changes: 1 addition & 13 deletions docs/Custom_Pagers.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ Support does not extend to Windows users, because we're making use of a package
git:
paging:
colorArg: always
useConfig: false
```

the `colorArg` key is for whether you want the `--color=always` arg in your `git diff` command. Some pagers want it set to `always`, others want it set to `never`.
Expand Down Expand Up @@ -54,17 +53,6 @@ git:

Be careful with this one, I think the homebrew and pip versions are behind master. I needed to directly download the ydiff script to get the no-pager functionality working.

## Using git config

```yaml
git:
paging:
colorArg: always
useConfig: true
```

If you set `useConfig: true`, lazygit will use whatever pager is specified in `$GIT_PAGER`, `$PAGER`, or your *git config*. If the pager ends with something like ` | less` we will strip that part out, because less doesn't play nice with our rendering approach. If the custom pager uses less under the hood, that will also break rendering (hence the `--paging=never` flag for the `delta` pager).

## Using external diff commands

Some diff tools can't work as a simple pager like the ones above do, because they need access to the entire diff, so just post-processing git's diff is not enough for them. The most notable example is probably [difftastic](https://difftastic.wilfred.me.uk).
Expand All @@ -77,7 +65,7 @@ git:
externalDiffCommand: difft --color=always
```

The `colorArg`, `pager`, and `useConfig` options are not used in this case.
The `colorArg` and `pager` options are not used in this case.

You can add whatever extra arguments you prefer for your difftool; for instance

Expand Down
6 changes: 0 additions & 6 deletions pkg/commands/git_commands/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,6 @@ func (self *ConfigCommands) ConfiguredPager() string {
}

func (self *ConfigCommands) GetPager(width int) string {
useConfig := self.UserConfig().Git.Paging.UseConfig
if useConfig {
pager := self.ConfiguredPager()
return strings.Split(pager, "| less")[0]
}

templateValues := map[string]string{
"columnWidth": strconv.Itoa(width/2 - 6),
}
Expand Down
3 changes: 0 additions & 3 deletions pkg/config/user_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,6 @@ type PagingConfig struct {
// delta --dark --paging=never
// ydiff -p cat -s --wrap --width={{columnWidth}}
Pager PagerType `yaml:"pager"`
// If true, Lazygit will use whatever pager is specified in `$GIT_PAGER`, `$PAGER`, or your *git config*. If the pager ends with something like ` | less` we will strip that part out, because less doesn't play nice with our rendering approach. If the custom pager uses less under the hood, that will also break rendering (hence the `--paging=never` flag for the `delta` pager).
UseConfig bool `yaml:"useConfig"`
// e.g. 'difft --color=always'
ExternalDiffCommand string `yaml:"externalDiffCommand"`
}
Expand Down Expand Up @@ -797,7 +795,6 @@ func GetDefaultConfig() *UserConfig {
Paging: PagingConfig{
ColorArg: "always",
Pager: "",
UseConfig: false,
ExternalDiffCommand: "",
},
Commit: CommitConfig{
Expand Down
2 changes: 2 additions & 0 deletions pkg/i18n/english.go
Original file line number Diff line number Diff line change
Expand Up @@ -2169,6 +2169,8 @@ keybinding:
universal:
suspendApp: <disabled>
redo: <c-z>

- The 'git.paging.useConfig' option has been removed. If you were relying on it to configure your pager, you'll have to explicitly set the pager again using the git.paging.pager' option.
`,
},
}
Expand Down
5 changes: 0 additions & 5 deletions schema/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -1672,11 +1672,6 @@
"ydiff -p cat -s --wrap --width={{columnWidth}}"
]
},
"useConfig": {
"type": "boolean",
"description": "If true, Lazygit will use whatever pager is specified in `$GIT_PAGER`, `$PAGER`, or your *git config*. If the pager ends with something like ` | less` we will strip that part out, because less doesn't play nice with our rendering approach. If the custom pager uses less under the hood, that will also break rendering (hence the `--paging=never` flag for the `delta` pager).",
"default": false
},
"externalDiffCommand": {
"type": "string",
"description": "e.g. 'difft --color=always'"
Expand Down
Loading