summaryrefslogtreecommitdiffstats
path: root/src/config.rs
AgeCommit message (Collapse)Author
2021-12-08Fix order of struct entriesDan Davison
2021-12-05Gracefully handle failure to parse hunk headerDan Davison
Fixes #765
2021-12-05Display merge conflictsDan Davison
2021-12-05Handle combined diff formatDan Davison
With this commit combined diff format (https://git-scm.com/docs/git-diff#_combined_diff_format) is handled appropriately. However, there is no special handling of merge conflict markers. Fixes #189, #736
2021-11-29Rename: FileMeta => DiffHeaderDan Davison
2021-11-24Support style names in --map-stylesDan Davison
2021-11-23New option to map raw styles encountered in inputDan Davison
Unify handling of styles parsed from raw line and computed diff styles. This enables syntax highlighting to be used in color-moved sections. Fixes #72
2021-11-22Navigate regexp (#782)Wayne Davison
* Allow navigate-regexp value to be overridden. * Don't add an empty label to the navigate_regexp. * Make --hunk-label=str not require --navigate. * Change navigate regexp to navigate regex. * Turn navigate-regex into an Option<String>.
2021-11-22Handle grep outputDan Davison
- Handle standard filepath:code and filepath:line_number:code output as produced by `git grep`, `rg -H`, `grep -H`, etc (with -n for line numbers). - Retain the match highlighting as produced by the grep tool, and expose it in delta's color output styled with grep-match-style. (Note that --color=always is needed to retain the color if piping into delta, but not for `git grep` when delta is configured as git's pager) - Special handling of -p, and -W options of `git grep`: these display the function context in which the matches occur. - `navigate` keybindings jump between match function contexts under `git grep -p` and between matching lines under `git grep -W`. Thanks @zachriggle for the proposal. Fixes #769
2021-11-21Allow styles to be specified as references to other stylesDan Davison
2021-11-17Add the --right-arrow option.Wayne Davison
This allows the file1 -> file2 arrow to be configured to whatever characters the user desires. The default is the same unicode arrow as before with 2 spaces after it, since this allows someone to remove the extra spaces that are in the current output.
2021-11-15Refactor: utils moduleDan Davison
2021-11-15Handle `git blame` outputDan Davison
Fixes #426 Partial versions of these changes were previously in master and then reverted multiple times. See #746 0745f853d4bed52aca0b6739ac452d54ff54a153 3aab5d19569fa52ace2d7e6d196a1256990c4e20
2021-11-14Sort config struct entriesDan Davison
2021-10-26Delete unused blame CLIDan Davison
This should have been done in 0745f853d4bed52aca0b6739ac452d54ff54a153 and the command line options were therefore incorrectly released in 0.9.0.
2021-10-25Re-enable ANSI fill by equalizing panel sizesThomas Otto
Make the two panels in side-by-side use the full terminal width by inserting an extra space in the center between the panels if the width is odd and ANSI filling is enabled. Fall back to spaces when the output is not to a terminal.
2021-10-25Wrap linenumber configs in MinusPlus or LeftRightThomas Otto
2021-10-18Use fatal() to exit with errorcode 2 (#739)Thomas Otto
* Fix two typos * Dismantle two Pyramids of Doom Use question mark operator instead * Use fatal() to exit with errorcode 2
2021-10-16Tests: store length of skipped header separatelyThomas Otto
2021-10-16Add inline-hint-style option and use for side-by-side wrap symbolsDan Davison
2021-10-16Rename syntect moduleDan Davison
2021-10-16Add side-by-side line wrappingThomas Otto
If the current line does not fit into the panel, then it is not truncated but split into multiple lines. A wrapping symbol is placed at the end of the line. If the new line is short enough, it is right-aligned. Wrapping is limited to a certain number of lines (--wrap-max-lines), if this is exceeded the line is truncated by a now highlighted truncation symbol. To disable wrapping set this value to 0.
2021-10-16Add fatal() function to handle exiting on errorsThomas Otto
Panic when testing or exit with return value 2.
2021-09-19Option to set the background extension mode to ANSI or spacesThomas Otto
In side-by-side mode, if `background_color_extends_to_terminal_width` is set, the left panel color is extended via spaces, but the right one via an ANSI sequence which instructs the terminal emulator to fill the background color rightwards. The command line option --line-fill-method ansi|spaces can change how the right panel background is filled. Add enums `BgShouldFill` and `BgFillMethod` to better distinguish if the background should be filled, and if so, how.
2021-09-19General PlusMinus data structureThomas Otto
Can be indexed with Minus/Plus or in a side-by-side context with Left/Right to represent the left/right Panels.
2021-08-28Set a default blame paletteDan Davison
2021-08-28Handle blame outputDan Davison
Fixes #291, #426
2021-08-28Add default-language optionDan Davison
2021-08-23More minimalistic display of submodule (short) diffs (#700)Dan Davison
* Rename state machine state: Submodule -> SubmoduleLog * More minimalistic display of submodule log diffs Partially fixes #662 * Defer emitting hunk header until first true hunk line A consequence is that we do not emit the (pseudo) hunk header in submodule (short) state; see #662.
2021-08-22662 submodule diffs (#699)Dan Davison
2021-08-20Hold GitConfig in main Config structDan Davison
2021-08-20Make it possible to jump between files when navigate is active (#684)Dan Davison
* Use distinct navigate label for file and hunk boundaries Ref #680 * Make it easy to remove hunk label from navigate regex Thanks @lepotic for the suggestion. Fixes #680 * Allow regex meta characters to be used in navigate anchors
2021-08-20Fix computed values to be computed after all set_options (#690)ulwlu
* Make truecolor option honorable from gitconfig * Add test that true-color can be read from git config The new test fails before 7ed3c2c3ee494dab25fd76b220da7c716a9b731f * Place computing process after set_options * Add test for checking if values requre computing set correctly * Remove unnecessary computed values candidate Co-authored-by: Dan Davison <dandavison7@gmail.com>
2021-06-09Add pager option for customizing pager without environment variables (#627)Kangwook Lee (이강욱)
* Add pager option * Use config.pager for output
2021-05-25Add hyperlinks-commit-link-format option (#614)Dan Davison
* Refactor: hyperlinks utility * Add hyperlinks-commit-link-format option Fixes #613
2021-05-24Support custom commit line regex when parsing git output (#558)Dan Davison
Fixes #174
2021-04-24Add relative-paths optionDan Davison
2021-04-24Add --diff-stat-align-width to control alignment of relativized pathsDan Davison
2021-04-24Output paths relative to current working directoryDan Davison
Fixes #552
2021-03-21Send navigation command to less on --show-themesCatherine Noll
2021-03-21Navigate from theme to theme with n/N when --show-themesCatherine Noll
2021-01-08Create git_config moduleDan Davison
2020-12-31Add styles for file path and line number in hunk headerDan Davison
Fixes #481
2020-12-27Use special style attribute to control line-number in hunk-headerDan Davison
2020-12-27Revert "Interpret `line-numbers = false` in gitconfig as no line numbers at ↵Dan Davison
all (#296)" This reverts commit ecb2da1e271aa0daa6dd2ed4c6658d59347020e6.
2020-12-19Implement hunk-header-style 'file' attributeDan Davison
Fixes #309
2020-12-16Exit with diff's exit code (#449)Dan Davison
Fixes #448
2020-12-08Make file style to be colored with same structure while color_only #405 (#436)ulwlu
* Add config property of color_only * Delete force assign raw to file_style when color_only * Print filemeta in color with rawline when color_only mode * Cargo fmt * Add test if file_style with color_only has style * Add comment about color_only
2020-12-05Expose line-buffer-size as a new option (#429)Dan Davison
Fixes #427
2020-11-22Handle copied filesDan Davison
Fixes #392