Add fzf functions to Vim

This commit is contained in:
Fabio Scotto di Santolo
2026-07-22 15:14:12 +02:00
parent 3e4c699acc
commit 9ce213a620
6 changed files with 205 additions and 0 deletions

View File

@@ -33,6 +33,18 @@ common_packages:
- zip
- zoxide
vim_plugins_enabled: true
vim_plugin_distro_packages:
- fzf
- vim-fugitive
vim_plugin_source_plugins:
- name: fzf
repo: https://github.com/junegunn/fzf.git
version: v0.72.0
- name: fzf.vim
repo: https://github.com/junegunn/fzf.vim.git
version: 34a564c81f36047f50e593c1656f4580ff75ccca
common_dotfiles:
- name: .bashrc
src: .bashrc

View File

@@ -5,6 +5,19 @@ platform_package_manager: pkg
platform_service_manager: rc
ansible_python_interpreter: /usr/local/bin/python3
vim_plugin_distro_packages:
- fzf
vim_plugin_source_plugins:
- name: fzf
repo: https://github.com/junegunn/fzf.git
version: v0.72.0
- name: fzf.vim
repo: https://github.com/junegunn/fzf.vim.git
version: 34a564c81f36047f50e593c1656f4580ff75ccca
- name: vim-fugitive
repo: https://github.com/tpope/vim-fugitive.git
version: 3b753cf8c6a4dcde6edee8827d464ba9b8c4a6f0
effective_user_group: "{{ user_group }}"
effective_user_home: "/home/{{ effective_username }}"
user_home: "/home/{{ username }}"

View File

@@ -3,3 +3,16 @@ platform_profile: void
platform_family: void
platform_package_manager: xbps
platform_service_manager: runit
vim_plugin_distro_packages:
- fzf
vim_plugin_source_plugins:
- name: fzf
repo: https://github.com/junegunn/fzf.git
version: v0.72.0
- name: fzf.vim
repo: https://github.com/junegunn/fzf.vim.git
version: 34a564c81f36047f50e593c1656f4580ff75ccca
- name: vim-fugitive
repo: https://github.com/tpope/vim-fugitive.git
version: 3b753cf8c6a4dcde6edee8827d464ba9b8c4a6f0

View File

@@ -7,6 +7,7 @@ effective_user_group: "{{ server_user_group }}"
effective_user_home: "{{ server_user_home }}"
server_container_stack_dir: /opt/docker/server
ai_agents_enabled: false
vim_plugins_enabled: false
profile_packages:
- avahi-daemon

View File

@@ -50,6 +50,53 @@
loop_control:
label: "{{ item.dest }}"
- name: Install distro packages for Vim plugins
tags: [packages, vim, fzf]
ansible.builtin.package:
name: "{{ vim_plugin_distro_packages | default([]) }}"
state: present
when:
- vim_plugins_enabled | default(false)
- (vim_plugin_distro_packages | default([])) | length > 0
- name: Ensure git package is installed for source Vim plugins
tags: [packages, vim, fzf]
ansible.builtin.package:
name: git
state: present
when:
- vim_plugins_enabled | default(false)
- (vim_plugin_source_plugins | default([])) | length > 0
- name: Ensure Vim plugin pack directory exists
tags: [dotfiles, dotfiles:common, vim, fzf]
ansible.builtin.file:
path: "{{ effective_user_home }}/.vim/pack/plugins/opt"
state: directory
owner: "{{ effective_username }}"
group: "{{ effective_user_group }}"
mode: "0755"
when:
- vim_plugins_enabled | default(false)
- (vim_plugin_source_plugins | default([])) | length > 0
- name: Install source Vim plugins
tags: [dotfiles, dotfiles:common, vim, fzf]
ansible.builtin.git:
repo: "{{ item.repo }}"
dest: "{{ effective_user_home }}/.vim/pack/plugins/opt/{{ item.name }}"
version: "{{ item.version }}"
update: false
become_user: "{{ effective_username }}"
environment:
HOME: "{{ effective_user_home }}"
loop: "{{ vim_plugin_source_plugins | default([]) }}"
loop_control:
label: "{{ item.name }}"
when:
- vim_plugins_enabled | default(false)
- (vim_plugin_source_plugins | default([])) | length > 0
- name: Ensure AI config directories exist
tags: [dotfiles, dotfiles:common]
ansible.builtin.file: