diff --git a/roles/user/git/tasks/install.yml b/roles/user/git/tasks/install.yml new file mode 100644 index 0000000..83addc2 --- /dev/null +++ b/roles/user/git/tasks/install.yml @@ -0,0 +1,9 @@ +--- +# TODO: Resolve the issues with EL +- name: Install the required packages + ansible.builtin.package: + name: + - git + - git-delta + state: present + become: true diff --git a/roles/user/git/tasks/main.yml b/roles/user/git/tasks/main.yml index 104fd3b..8bf9765 100644 --- a/roles/user/git/tasks/main.yml +++ b/roles/user/git/tasks/main.yml @@ -1,4 +1,8 @@ --- +- name: Packages + ansible.builtin.include_tasks: install.yml + tags: install + - name: Create git config ansible.builtin.template: src: templates/gitconfig diff --git a/roles/user/git/templates/gitconfig b/roles/user/git/templates/gitconfig index 590295d..d8c6ed8 100644 --- a/roles/user/git/templates/gitconfig +++ b/roles/user/git/templates/gitconfig @@ -8,6 +8,22 @@ [core] editor = code --wait excludesfile = /home/{{ target_user }}/.gitignore + pager = delta + +[delta] + file-style = blue bold + # file-decoration-style = omit + hunk-header-style = omit + hunk-header-decoration-style = omit + # minus-emph-style = normal "#701011" + # plus-emph-style = syntax "#105010" + + line-numbers = true + hyperlinks = true + # hyperlinks-file-link-format = "vscode://file/{path}:{line}" + # side-by-side = true + navigate = true + features = decorations [diff] tool = vscode-difftool