setup-cockpit/roles/neovim/tasks/debian.yml

132 lines
3.6 KiB
YAML

---
- name: Install neovim
block:
- name: Try installing with apt (from neovim v0.8)
become: true
ansible.builtin.apt:
name: neovim>0.8*
rescue:
- name: Build neovim
ansible.builtin.include_tasks: build_neovim.yml
- name: Install things with apt
become: true
ansible.builtin.apt:
name:
- ansible-lint
- python3-pynvim
- build-essential
- python3-dev
- cmake
- clang
- clangd
- npm
- ripgrep
- zathura
- rsync # for 'synchronize' module
- flake8
- mypy
- pylint3
- shellcheck
- name: Install things with pip
ansible.builtin.pip:
name:
- jedi-language-server
extra_args: --user
- name: Install things with npm
become: true
community.general.npm:
name: "{{ item }}"
global: true
with_items:
- '@ansible/ansible-language-server'
- bash-language-server
- diagnostic-languageserver
- name: Find latest texlab version
ansible.builtin.uri:
url: https://github.com/latex-lsp/texlab/releases/latest
register: latest_http_content
- name: Set latest texlab version
ansible.builtin.set_fact:
texlab_version: "{{ latest_http_content.url | split('/') | last }}"
- name: Get latest texlab binary
ansible.builtin.unarchive:
src: "https://github.com/latex-lsp/texlab/releases/download/{{ texlab_version }}/texlab-{{ ansible_facts.architecture }}-linux.tar.gz"
remote_src: true
dest: ~/.local/bin/
mode: 0755
- name: Find latest lua-language-server version
ansible.builtin.uri:
url: https://github.com/luals/lua-language-server/releases/latest
register: latest_http_content
- name: Set latest lua-language-server version
ansible.builtin.set_fact:
lua_lsp_version: "{{ latest_http_content.url | split('/') | last }}"
- name: Create tempdir for extracting lua-language-server
ansible.builtin.file:
path: /tmp/lualsp
state: directory
mode: 0755
changed_when: false
- name: Get latest lua-lsp archive
ansible.builtin.unarchive:
src: "https://github.com/luals/lua-language-server/releases/download/{{ lua_lsp_version }}/lua-language-server-{{ lua_lsp_version }}-linux-x64.tar.gz"
remote_src: true
dest: /tmp/lualsp/
changed_when: false
- name: Copy lua-lsp binary
ansible.builtin.copy:
src: /tmp/lualsp/bin/lua-language-server
remote_src: true
dest: ~/.local/bin/
mode: 0755
- name: Find latest rust-analyzer version
ansible.builtin.uri:
url: https://github.com/rust-lang/rust-analyzer/releases/latest
register: latest_http_content
- name: Set latest rust-analyzer version
ansible.builtin.set_fact:
rust_analyzer_version: "{{ latest_http_content.url | split('/') | last }}"
- name: Create tempdir for extracting rust-analyzer
ansible.builtin.file:
path: /tmp/rust-analyzer
state: directory
mode: 0755
changed_when: false
- name: Get latest rust-analyzer compressed binary
ansible.builtin.get_url:
url: "https://github.com/rust-lang/rust-analyzer/releases/download/{{ rust_analyzer_version }}/rust-analyzer-x86_64-unknown-linux-gnu.gz"
dest: /tmp/rust-analyzer/
mode: 0644
changed_when: false
- name: Decompress rust-analyzer binary
ansible.builtin.command:
cmd: gzip -fd /tmp/rust-analyzer/rust-analyzer-x86_64-unknown-linux-gnu.gz
chdir: /tmp/rust-analyzer
changed_when: false
- name: Copy rust-analyzer binary
ansible.builtin.copy:
src: /tmp/rust-analyzer/rust-analyzer-x86_64-unknown-linux-gnu
remote_src: true
dest: ~/.local/bin/rust-analyzer
mode: 0755
- name: Include marksman tasks
ansible.builtin.include_tasks: marksman.yml