Install rust-analyzer for Debian

This commit is contained in:
Tunui Franken 2022-12-01 09:14:40 +01:00
parent 55a8e8bdf7
commit ef6ba987ba

View file

@ -80,7 +80,6 @@
- mypy
- pylint3
- shellcheck
# - rust-analyzer # TODO: find how to install this on Debian
- name: Install things with pip (Debian)
pip:
name:
@ -134,6 +133,36 @@
remote_src: true
dest: ~/.local/bin/
mode: 0755
- name: Find latest rust-analyzer version
uri:
url: https://github.com/rust-lang/rust-analyzer/releases/latest
register: latest_http_content
- name: Set latest rust-analyzer version
set_fact:
rust_analyzer_version: "{{ latest_http_content.url | split('/') | last }}"
- name: Create tempdir for extracting rust-analyzer
file:
path: /tmp/rust-analyzer
state: directory
mode: 0755
changed_when: false
- name: Get latest rust-analyzer compressed binary
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
command:
cmd: gzip -d /tmp/rust-analyzer/rust-analyzer-x86_64-unknown-linux-gnu.gz
chdir: /tmp/rust-analyzer
changed_when: false
- name: Copy rust-analyzer binary
copy:
src: /tmp/rust-analyzer/rust-analyzer-x86_64-unknown-linux-gnu
remote_src: true
dest: ~/.local/bin/rust-analyzer
mode: 0755
- name: Grab marksman (LSP server) binary
block: