diff --git a/README.md b/README.md index b74f1e3..bf5a2a4 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,6 @@ ## TODO - nextcloud (could automatically add directory but difficult) -- latest neovim - Telegram (maybe only possible to download) - Oh my zsh? -- vscodium +- Cool neovim setup diff --git a/roles/system/tasks/main.yml b/roles/system/tasks/main.yml index 6ebc712..15bda75 100644 --- a/roles/system/tasks/main.yml +++ b/roles/system/tasks/main.yml @@ -61,6 +61,16 @@ - libxml2-utils - libncurses-dev - openjdk-11-jdk + # Neovim stuff: https://github.com/neovim/neovim/wiki/Building-Neovim#build-prerequisites + - ninja-build + - gettext + - libtool + - libtool-bin + - automake + - cmake + - g++ + - pkg-config + - doxygen - name: Set default shell to zsh become: true user: @@ -96,3 +106,24 @@ - name: Install VSCodium extensions shell: "codium --install-extension {{ item }}" loop: "{{ vscodium_extensions | difference(ansible_facts.ansible_local.vscodium_extensions) }}" +- name: Create git repository directory + file: + path: ~/repos + state: directory +- name: Pull neovim repository + git: + repo: https://github.com/neovim/neovim.git + dest: ~/repos/neovim + version: stable +- name: Build neovim + make: + chdir: ~/repos/neovim + params: + CMAKE_BUILD_TYPE: RelWithDebInfo + changed_when: false # I lie a bit, but neovim makefile doesn't cooperate +- name: Install neovim + become: true + make: + chdir: "/home/{{ ansible_user_id }}/repos/neovim" + target: install + changed_when: false # Idem diff --git a/roles/system/templates/.zshrc.j2 b/roles/system/templates/.zshrc.j2 index 9f394b5..7aa8b26 100644 --- a/roles/system/templates/.zshrc.j2 +++ b/roles/system/templates/.zshrc.j2 @@ -36,7 +36,7 @@ zstyle ':completion:*' verbose true zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31' zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd' -# Custom stuff +# Git aliases alias gp='git push' alias gco='git checkout' alias gd='git diff' @@ -51,3 +51,8 @@ alias gl='git log' . $HOME/.asdf/asdf.sh fpath=(${ASDF_DIR}/completions $fpath) autoload -Uz compinit && compinit + +# For neovim +PATH=$PATH:/usr/local +alias vi='nvim' +alias vim='nvim'