feat(jj): configure to use hunk.nvim if available
This should keep me inside of nvim for longer c:
This commit is contained in:
parent
fe00695bde
commit
77c73c2ea9
1 changed files with 13 additions and 1 deletions
|
@ -123,9 +123,21 @@ in
|
||||||
# Jujutsu (alternative DVCS (git-compatible))
|
# Jujutsu (alternative DVCS (git-compatible))
|
||||||
jujutsu = {
|
jujutsu = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
# Use the more up to date version of jj
|
||||||
package = pkgs.unstable.jujutsu;
|
package = pkgs.unstable.jujutsu;
|
||||||
settings = {
|
settings = {
|
||||||
ui.pager = "bat";
|
ui = lib.mkMerge [
|
||||||
|
# If `bat` is available use it as the pager
|
||||||
|
(lib.mkIf config.programs.bat.enable { pager = "bat"; })
|
||||||
|
# if hunk.nvim is enabled use it as a diff editor
|
||||||
|
(lib.mkIf config.programs.nixvim.plugins.hunk.enable {
|
||||||
|
diff-editor = [
|
||||||
|
"nvim"
|
||||||
|
"-c"
|
||||||
|
"DiffEditor $left $right $output"
|
||||||
|
];
|
||||||
|
})
|
||||||
|
];
|
||||||
fix.tools = builtins.mapAttrs (tool: cmd: jjFormatters.${tool} cmd) nvimFormatters;
|
fix.tools = builtins.mapAttrs (tool: cmd: jjFormatters.${tool} cmd) nvimFormatters;
|
||||||
# mimic git commit --verbose by adding a diff
|
# mimic git commit --verbose by adding a diff
|
||||||
templates.draft_commit_description = ''
|
templates.draft_commit_description = ''
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue