1
0

Added Neovim

This commit is contained in:
2025-10-13 10:23:32 +02:00
parent 6329e7230d
commit cb18dae665
7 changed files with 28 additions and 4 deletions

View File

@@ -1,8 +1,9 @@
{{- $email := promptStringOnce . "email" "What's your email?" }} {{- $email := promptStringOnce . "email" "What's your email" }}
{{- $git_name := promptStringOnce . "git_name" "What's your Git name?" }} {{- $git_name := promptStringOnce . "git_name" "What's your Git name" }}
{{- $shell := promptBoolOnce . "features.shell" "Do you want to install the Fish shell?" true }} {{- $shell := promptBoolOnce . "features.shell" "Do you want to install the Fish shell" true }}
{{- $git := promptBoolOnce . "features.git" "Do you want to install Git?" true }} {{- $git := promptBoolOnce . "features.git" "Do you want to install Git" true }}
{{- $editor := promptBoolOnce . "features.editor" "Do you want to install Neovim" true }}
[data] [data]
email = {{ $email | quote }} email = {{ $email | quote }}
@@ -11,3 +12,4 @@ git_name = {{ $git_name | quote }}
[data.features] [data.features]
shell = {{ $shell }} shell = {{ $shell }}
git = {{ $git }} git = {{ $git }}
editor = {{ $editor }}

View File

@@ -6,3 +6,7 @@
{{- if not .features.git }} {{- if not .features.git }}
.config/git .config/git
{{- end }} {{- end }}
{{- if not .features.editor }}
.config/nvim
{{- end }}

View File

@@ -0,0 +1,7 @@
abbr --add --position command l ls -lAh
{{- if .features.editor }}
# Alias `vi` and `vim` to Neovim
abbr --add --position command vim nvim
abbr --add --position command vi nvim
{{- end }}

View File

@@ -0,0 +1,4 @@
{{- if .features.editor }}
# Set Neovim to be the default editor
set --export EDITOR nvim
{{- end }}

View File

View File

@@ -27,3 +27,5 @@
when: features.shell == true when: features.shell == true
- role: git - role: git
when: features.git == true when: features.git == true
- role: editor
when: features.editor == true

View File

@@ -0,0 +1,5 @@
- name: Install Neovim on Arch
become: true
ansible.builtin.pacman:
name: neovim
when: chezmoi.osRelease.id == "arch"