Skip to content

Commit 396f87b

Browse files
committed
Unwrap paragraphs in user_config comments
We want to switch to have paragraphs consistently on one line, and auto-wrap them automatically when generating Config.md. The changes to Config.md in this commit are temporary.
1 parent 30169bd commit 396f87b

File tree

3 files changed

+27
-51
lines changed

3 files changed

+27
-51
lines changed

docs/Config.md

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,7 @@ gui:
9494
# If true, increase the height of the focused side window; creating an accordion effect.
9595
expandFocusedSidePanel: false
9696

97-
# The weight of the expanded side panel, relative to the other panels. 2 means
98-
# twice as tall as the other panels. Only relevant if `expandFocusedSidePanel` is true.
97+
# The weight of the expanded side panel, relative to the other panels. 2 means twice as tall as the other panels. Only relevant if `expandFocusedSidePanel` is true.
9998
expandedSidePanelWeight: 2
10099

101100
# Sometimes the main window is split in two (e.g. when the selected file has both staged and unstaged changes). This setting controls how the two sections are split.
@@ -111,9 +110,7 @@ gui:
111110
# - 'top': split the window vertically (side panel on top, main view below)
112111
enlargedSideViewLocation: left
113112

114-
# If true, wrap lines in the staging view to the width of the view. This
115-
# makes it much easier to work with diffs that have long lines, e.g.
116-
# paragraphs of markdown text.
113+
# If true, wrap lines in the staging view to the width of the view. This makes it much easier to work with diffs that have long lines, e.g. paragraphs of markdown text.
117114
wrapLinesInStagingView: true
118115

119116
# If true, hunk selection mode will be enabled by default when entering the staging view.
@@ -353,10 +350,7 @@ git:
353350
# If true, pass the --all arg to git fetch
354351
fetchAll: true
355352

356-
# If true, lazygit will automatically stage files that used to have merge
357-
# conflicts but no longer do; and it will also ask you if you want to
358-
# continue a merge or rebase if you've resolved all conflicts. If false, it
359-
# won't do either of these things.
353+
# If true, lazygit will automatically stage files that used to have merge conflicts but no longer do; and it will also ask you if you want to continue a merge or rebase if you've resolved all conflicts. If false, it won't do either of these things.
360354
autoStageResolvedConflicts: true
361355

362356
# Command used when displaying the current branch git log in the main window
@@ -397,8 +391,7 @@ git:
397391
# Config for showing the log in the commits view
398392
log:
399393
# One of: 'date-order' | 'author-date-order' | 'topo-order' | 'default'
400-
# 'topo-order' makes it easier to read the git log graph, but commits may not
401-
# appear chronologically. See https://git-scm.com/docs/
394+
# 'topo-order' makes it easier to read the git log graph, but commits may not appear chronologically. See https://git-scm.com/docs/
402395
#
403396
# Can be changed from within Lazygit with `Log menu -> Commit sort order` (`<c-l>` in the commits window by default).
404397
order: topo-order
@@ -422,8 +415,7 @@ git:
422415
# Can be changed from within Lazygit with the Sort Order menu (`s`) in the remote branches panel.
423416
remoteBranchSortOrder: date
424417

425-
# When copying commit hashes to the clipboard, truncate them to this
426-
# length. Set to 40 to disable truncation.
418+
# When copying commit hashes to the clipboard, truncate them to this length. Set to 40 to disable truncation.
427419
truncateCopiedCommitHashesTo: 12
428420

429421
# Periodic update checks
@@ -455,12 +447,10 @@ os:
455447
# Command for editing a file. Should contain "{{filename}}".
456448
edit: ""
457449

458-
# Command for editing a file at a given line number. Should contain
459-
# "{{filename}}", and may optionally contain "{{line}}".
450+
# Command for editing a file at a given line number. Should contain "{{filename}}", and may optionally contain "{{line}}".
460451
editAtLine: ""
461452

462-
# Same as EditAtLine, except that the command needs to wait until the
463-
# window is closed.
453+
# Same as EditAtLine, except that the command needs to wait until the window is closed.
464454
editAtLineAndWait: ""
465455

466456
# Whether lazygit suspends until an edit process returns
@@ -469,12 +459,10 @@ os:
469459
# For opening a directory in an editor
470460
openDirInEditor: ""
471461

472-
# A built-in preset that sets all of the above settings. Supported presets
473-
# are defined in the getPreset function in editor_presets.go.
462+
# A built-in preset that sets all of the above settings. Supported presets are defined in the getPreset function in editor_presets.go.
474463
editPreset: ""
475464

476-
# Command for opening a file, as if the file is double-clicked. Should
477-
# contain "{{filename}}", but doesn't support "{{line}}".
465+
# Command for opening a file, as if the file is double-clicked. Should contain "{{filename}}", but doesn't support "{{line}}".
478466
open: ""
479467

480468
# Command for opening a link. Should contain "{{link}}".

pkg/config/user_config.go

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,7 @@ type GuiConfig struct {
8989
SidePanelWidth float64 `yaml:"sidePanelWidth" jsonschema:"maximum=1,minimum=0"`
9090
// If true, increase the height of the focused side window; creating an accordion effect.
9191
ExpandFocusedSidePanel bool `yaml:"expandFocusedSidePanel"`
92-
// The weight of the expanded side panel, relative to the other panels. 2 means
93-
// twice as tall as the other panels. Only relevant if `expandFocusedSidePanel` is true.
92+
// The weight of the expanded side panel, relative to the other panels. 2 means twice as tall as the other panels. Only relevant if `expandFocusedSidePanel` is true.
9493
ExpandedSidePanelWeight int `yaml:"expandedSidePanelWeight"`
9594
// Sometimes the main window is split in two (e.g. when the selected file has both staged and unstaged changes). This setting controls how the two sections are split.
9695
// Options are:
@@ -103,9 +102,7 @@ type GuiConfig struct {
103102
// - 'left': split the window horizontally (side panel on the left, main view on the right)
104103
// - 'top': split the window vertically (side panel on top, main view below)
105104
EnlargedSideViewLocation string `yaml:"enlargedSideViewLocation"`
106-
// If true, wrap lines in the staging view to the width of the view. This
107-
// makes it much easier to work with diffs that have long lines, e.g.
108-
// paragraphs of markdown text.
105+
// If true, wrap lines in the staging view to the width of the view. This makes it much easier to work with diffs that have long lines, e.g. paragraphs of markdown text.
109106
WrapLinesInStagingView bool `yaml:"wrapLinesInStagingView"`
110107
// If true, hunk selection mode will be enabled by default when entering the staging view.
111108
UseHunkModeInStagingView bool `yaml:"useHunkModeInStagingView"`
@@ -255,10 +252,7 @@ type GitConfig struct {
255252
AutoForwardBranches string `yaml:"autoForwardBranches" jsonschema:"enum=none,enum=onlyMainBranches,enum=allBranches"`
256253
// If true, pass the --all arg to git fetch
257254
FetchAll bool `yaml:"fetchAll"`
258-
// If true, lazygit will automatically stage files that used to have merge
259-
// conflicts but no longer do; and it will also ask you if you want to
260-
// continue a merge or rebase if you've resolved all conflicts. If false, it
261-
// won't do either of these things.
255+
// If true, lazygit will automatically stage files that used to have merge conflicts but no longer do; and it will also ask you if you want to continue a merge or rebase if you've resolved all conflicts. If false, it won't do either of these things.
262256
AutoStageResolvedConflicts bool `yaml:"autoStageResolvedConflicts"`
263257
// Command used when displaying the current branch git log in the main window
264258
BranchLogCmd string `yaml:"branchLogCmd"`
@@ -293,8 +287,7 @@ type GitConfig struct {
293287
// One of: 'date' (default) | 'alphabetical'
294288
// Can be changed from within Lazygit with the Sort Order menu (`s`) in the remote branches panel.
295289
RemoteBranchSortOrder string `yaml:"remoteBranchSortOrder" jsonschema:"enum=date,enum=alphabetical"`
296-
// When copying commit hashes to the clipboard, truncate them to this
297-
// length. Set to 40 to disable truncation.
290+
// When copying commit hashes to the clipboard, truncate them to this length. Set to 40 to disable truncation.
298291
TruncateCopiedCommitHashesTo int `yaml:"truncateCopiedCommitHashesTo"`
299292
}
300293

@@ -343,8 +336,7 @@ type MergingConfig struct {
343336

344337
type LogConfig struct {
345338
// One of: 'date-order' | 'author-date-order' | 'topo-order' | 'default'
346-
// 'topo-order' makes it easier to read the git log graph, but commits may not
347-
// appear chronologically. See https://git-scm.com/docs/
339+
// 'topo-order' makes it easier to read the git log graph, but commits may not appear chronologically. See https://git-scm.com/docs/
348340
//
349341
// Can be changed from within Lazygit with `Log menu -> Commit sort order` (`<c-l>` in the commits window by default).
350342
Order string `yaml:"order" jsonschema:"enum=date-order,enum=author-date-order,enum=topo-order,enum=default"`
@@ -582,12 +574,10 @@ type OSConfig struct {
582574
// Command for editing a file. Should contain "{{filename}}".
583575
Edit string `yaml:"edit,omitempty"`
584576

585-
// Command for editing a file at a given line number. Should contain
586-
// "{{filename}}", and may optionally contain "{{line}}".
577+
// Command for editing a file at a given line number. Should contain "{{filename}}", and may optionally contain "{{line}}".
587578
EditAtLine string `yaml:"editAtLine,omitempty"`
588579

589-
// Same as EditAtLine, except that the command needs to wait until the
590-
// window is closed.
580+
// Same as EditAtLine, except that the command needs to wait until the window is closed.
591581
EditAtLineAndWait string `yaml:"editAtLineAndWait,omitempty"`
592582

593583
// Whether lazygit suspends until an edit process returns
@@ -598,12 +588,10 @@ type OSConfig struct {
598588
// For opening a directory in an editor
599589
OpenDirInEditor string `yaml:"openDirInEditor,omitempty"`
600590

601-
// A built-in preset that sets all of the above settings. Supported presets
602-
// are defined in the getPreset function in editor_presets.go.
591+
// A built-in preset that sets all of the above settings. Supported presets are defined in the getPreset function in editor_presets.go.
603592
EditPreset string `yaml:"editPreset,omitempty" jsonschema:"example=vim,example=nvim,example=emacs,example=nano,example=vscode,example=sublime,example=kakoune,example=helix,example=xcode,example=zed,example=acme"`
604593

605-
// Command for opening a file, as if the file is double-clicked. Should
606-
// contain "{{filename}}", but doesn't support "{{line}}".
594+
// Command for opening a file, as if the file is double-clicked. Should contain "{{filename}}", but doesn't support "{{line}}".
607595
Open string `yaml:"open,omitempty"`
608596

609597
// Command for opening a link. Should contain "{{link}}".

schema/config.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@
341341
},
342342
"autoStageResolvedConflicts": {
343343
"type": "boolean",
344-
"description": "If true, lazygit will automatically stage files that used to have merge\nconflicts but no longer do; and it will also ask you if you want to\ncontinue a merge or rebase if you've resolved all conflicts. If false, it\nwon't do either of these things.",
344+
"description": "If true, lazygit will automatically stage files that used to have merge conflicts but no longer do; and it will also ask you if you want to continue a merge or rebase if you've resolved all conflicts. If false, it won't do either of these things.",
345345
"default": true
346346
},
347347
"branchLogCmd": {
@@ -437,7 +437,7 @@
437437
},
438438
"truncateCopiedCommitHashesTo": {
439439
"type": "integer",
440-
"description": "When copying commit hashes to the clipboard, truncate them to this\nlength. Set to 40 to disable truncation.",
440+
"description": "When copying commit hashes to the clipboard, truncate them to this length. Set to 40 to disable truncation.",
441441
"default": 12
442442
}
443443
},
@@ -543,7 +543,7 @@
543543
},
544544
"expandedSidePanelWeight": {
545545
"type": "integer",
546-
"description": "The weight of the expanded side panel, relative to the other panels. 2 means\ntwice as tall as the other panels. Only relevant if `expandFocusedSidePanel` is true.",
546+
"description": "The weight of the expanded side panel, relative to the other panels. 2 means twice as tall as the other panels. Only relevant if `expandFocusedSidePanel` is true.",
547547
"default": 2
548548
},
549549
"mainPanelSplitMode": {
@@ -563,7 +563,7 @@
563563
},
564564
"wrapLinesInStagingView": {
565565
"type": "boolean",
566-
"description": "If true, wrap lines in the staging view to the width of the view. This\nmakes it much easier to work with diffs that have long lines, e.g.\nparagraphs of markdown text.",
566+
"description": "If true, wrap lines in the staging view to the width of the view. This makes it much easier to work with diffs that have long lines, e.g. paragraphs of markdown text.",
567567
"default": true
568568
},
569569
"useHunkModeInStagingView": {
@@ -1548,7 +1548,7 @@
15481548
"topo-order",
15491549
"default"
15501550
],
1551-
"description": "One of: 'date-order' | 'author-date-order' | 'topo-order' | 'default'\n'topo-order' makes it easier to read the git log graph, but commits may not\nappear chronologically. See https://git-scm.com/docs/\n\nCan be changed from within Lazygit with `Log menu -\u003e Commit sort order` (`\u003cc-l\u003e` in the commits window by default).",
1551+
"description": "One of: 'date-order' | 'author-date-order' | 'topo-order' | 'default'\n'topo-order' makes it easier to read the git log graph, but commits may not appear chronologically. See https://git-scm.com/docs/\n\nCan be changed from within Lazygit with `Log menu -\u003e Commit sort order` (`\u003cc-l\u003e` in the commits window by default).",
15521552
"default": "topo-order"
15531553
},
15541554
"showGraph": {
@@ -1603,11 +1603,11 @@
16031603
},
16041604
"editAtLine": {
16051605
"type": "string",
1606-
"description": "Command for editing a file at a given line number. Should contain\n\"{{filename}}\", and may optionally contain \"{{line}}\"."
1606+
"description": "Command for editing a file at a given line number. Should contain \"{{filename}}\", and may optionally contain \"{{line}}\"."
16071607
},
16081608
"editAtLineAndWait": {
16091609
"type": "string",
1610-
"description": "Same as EditAtLine, except that the command needs to wait until the\nwindow is closed."
1610+
"description": "Same as EditAtLine, except that the command needs to wait until the window is closed."
16111611
},
16121612
"editInTerminal": {
16131613
"type": "boolean",
@@ -1619,7 +1619,7 @@
16191619
},
16201620
"editPreset": {
16211621
"type": "string",
1622-
"description": "A built-in preset that sets all of the above settings. Supported presets\nare defined in the getPreset function in editor_presets.go.",
1622+
"description": "A built-in preset that sets all of the above settings. Supported presets are defined in the getPreset function in editor_presets.go.",
16231623
"examples": [
16241624
"vim",
16251625
"nvim",
@@ -1636,7 +1636,7 @@
16361636
},
16371637
"open": {
16381638
"type": "string",
1639-
"description": "Command for opening a file, as if the file is double-clicked. Should\ncontain \"{{filename}}\", but doesn't support \"{{line}}\"."
1639+
"description": "Command for opening a file, as if the file is double-clicked. Should contain \"{{filename}}\", but doesn't support \"{{line}}\"."
16401640
},
16411641
"openLink": {
16421642
"type": "string",

0 commit comments

Comments
 (0)