30 lines
1.0 KiB
YAML
30 lines
1.0 KiB
YAML
- name: Check if cargo is installed
|
|
shell: command -v cargo >/dev/null 2>&1
|
|
register: cargo_exists
|
|
ignore_errors: yes
|
|
- name: Check if go is installed
|
|
shell: command -v go >/dev/null 2>&1
|
|
register: go_exists
|
|
ignore_errors: yes
|
|
# TODO: Figure out how to transform cargo_flag.rc == 0 && echo --racer-completer
|
|
- name: Install youcompleteme
|
|
shell:
|
|
cmd: ./install.py
|
|
chdir: "~/.vim/plugged/YouCompleteMe"
|
|
when: "go_exists.rc != 0 and cargo_exists.rc != 0"
|
|
- name: Install youcompleteme with rust
|
|
shell:
|
|
cmd: ./install.py --racer-completer
|
|
chdir: "~/.vim/plugged/YouCompleteMe"
|
|
when: "go_exists.rc != 0 and cargo_exists.rc == 0"
|
|
- name: Install youcompleteme with go
|
|
shell:
|
|
cmd: ./install.py --gocode-completer
|
|
chdir: "~/.vim/plugged/YouCompleteMe"
|
|
when: "go_exists.rc == 0 and cargo_exists.rc != 0"
|
|
- name: Install youcompleteme with rust and go
|
|
shell:
|
|
cmd: ./install.py --gocode-completer --racer-completer
|
|
chdir: "~/.vim/plugged/YouCompleteMe"
|
|
when: "go_exists.rc == 0 and cargo_exists.rc == 0"
|