Skip to content

buluma/ansible-role-nvim

Ansible role nvim

Install and Configure NVIM on your Linux systems.

GitHub Version Issues Pull Requests Downloads
github Version Issues PullRequests Ansible Role

This example is taken from molecule/default/converge.yml and is tested on each push, pull request and release.

---
- name: Converge
  hosts: all
  become: true
  gather_facts: true
  vars:
    nvim_user: shadowwalker
    neovim: true
    neovim_nightly: false
    neovim_pip3_state: false
    treesitter: true
  tasks:
    - name: Adding user
      ansible.builtin.user:
        name: "{{ nvim_user }}"
        create_home: true
        shell: /bin/bash

    - name: Run nvim role
      ansible.builtin.include_role:
        name: buluma.nvim

The machine needs to be prepared. In CI this is done using molecule/default/prepare.yml:

---
- name: Prepare
  hosts: all
  become: true
  gather_facts: false

  roles:
    - role: buluma.bootstrap
    - role: buluma.ca_certificates

Also see a full explanation and example on how to use these roles.

The default values for the variables are set in defaults/main.yml:

# Default variables for 'neovim' role
#
# These variables have the lowest priority of any variables available, and can
# be easily overridden by any other variable, including inventory variables.
#
# (See Using Variables for more information)
# https://docs.ansible.com/ansible/latest/user_guide/playbooks_variables.html#playbooks-variables
---
# application versions
neovim_version: "0.9.5"
treesitter_version: "0.22.2"

# variables for downloading appimages
nvim_dl_dir: "/opt/nvim/{{ neovim_version }}"
nvim_appimage_url: "https://github.com/neovim/neovim/releases/download/v{{ neovim_version }}/nvim.appimage"
treesitter_dl_dir: "/opt/treesitter/{{ treesitter_version }}"
treesitter_dl_name: "tree-sitter-linux-x64.gz"
treesitter_archive_url: "https://github.com/tree-sitter/tree-sitter/releases/download/v{{ treesitter_version }}/{{ treesitter_dl_name }}"
treesitter_filename: "tree-sitter-linux-x64"

# toggles for end-users
neovim: true
treesitter: true
neovim_nightly: false

neovim_pde: false
neovim_apt_packages: []
neovim_pip_packages: []
neovim_npm_packages: []
neovim_config_dirs: []
neovim_external_config: []
neovim_config_syncs: []

# digging deeper
neovim_pip3_packager_state: latest
neovim_npm_packager_state: latest
neovim_pip3_state: latest
neovim_apt_state: latest
...

The following roles are used to prepare a system. You can prepare your system in another way.

Requirement GitHub Version
buluma.bootstrap Ansible Molecule Version
buluma.ca_certificates Ansible Molecule Version

This role is a part of many compatible roles. Have a look at the documentation of these roles for further information.

Here is an overview of related roles:

dependencies

This role has been tested on these container images:

container tags
Fedora all
Ubuntu all
Debian all

The minimum version of Ansible required is 2.4, tests have been done to:

  • The previous version.
  • The current version.
  • The development version.

If you find issues, please register them in GitHub

Role History

Apache-2.0

Shadow Walker

About

Nvim Install and Setup

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published