diff --git a/tasks.yaml b/tasks.yaml index f753cfe..de7c267 100644 --- a/tasks.yaml +++ b/tasks.yaml @@ -1,45 +1,17 @@ --- -- name: (neo)vim clone minpac +- include_vars: ~/.config/nvim/vars.yaml + +- name: clone plugin repos + when: ansible_os_family != "Windows" git: - repo: https://github.com/k-takata/minpac.git - dest: pack/minpac/opt/minpac + repo: 'https://github.com/{{item.repo}}.git' + dest: '~/.config/nvim/pack/minpac/{{lookup("vars", "item.mode", default="start")}}/{{item.repo | regex_replace("^.*\/(.*)$", "\1")}}' + version: '{{lookup("vars", "item.branch", default="HEAD")}}' + with_items: '{{plugins}}' -- name: (neo)vim install pip packages - pip: - name: - - cmake-language-server - - cmakelint - - compdb - - vim-vint - - yamllint - state: latest - extra_args: --user - -- name: (neo)vim install node.js Linux - when: ansible_system == "Linux" - include_tasks: nodejs-linux.yaml -- name: (neo)vim install node.js macOS - when: ansible_os_family == "Darwin" - homebrew: name=node state=latest -- name: (neo)vim install node.js Windows +- name: clone plugin repos when: ansible_os_family == "Windows" - win_chocolatey: name=nodejs state=latest - -- name: (neo)vim install apt packages - when: ansible_distribution == 'Ubuntu' and - ansible_distribution_release == '20.04' - become: true - apt: - name: - - clangd-12 - state: latest - -- name: (neo)vim install clangd alternative - when: ansible_distribution == 'Ubuntu' and - ansible_distribution_release == '20.04' - become: true - alternatives: - name: clangd - path: /usr/bin/clangd-12 - link: /usr/local/bin/clangd - priority: 120 + win_git: + repo: 'https://github.com/{{item.repo}}.git' + dest: '{{ansible_env.LOCALAPPDATA}}/nvim/pack/minpac/{{lookup("vars", "item.mode", default="start")}}/{{item.repo | regex_replace("^.*\/(.*)$", "\1")}}' + version: '{{lookup("vars", "item.branch", default="HEAD")}}' diff --git a/vars.yaml b/vars.yaml new file mode 100644 index 0000000..dc09582 --- /dev/null +++ b/vars.yaml @@ -0,0 +1,66 @@ +--- +plugins: + - repo: mkitt/tabline.vim + - repo: neoclide/coc.nvim + branch: release + - repo: SirVer/ultisnips + - repo: honza/vim-snippets + - repo: vim-scripts/vimomni + mode: opt + - repo: w0rp/ale + - repo: mhinz/vim-signify + + # Text Objects + - repo: kana/vim-textobj-user + # TODO: Doesn't work with nvim + - repo: kana/vim-textobj-entire + - repo: sgur/vim-textobj-parameter + - repo: jceb/vim-textobj-uri + - repo: glts/vim-textobj-comment + - repo: reedes/vim-textobj-sentence + + # Tim Pope + - repo: tpope/vim-commentary + - repo: tpope/vim-surround + - repo: tpope/vim-repeat + - repo: tpope/vim-fugitive + - repo: tpope/vim-eunuch + - repo: tpope/vim-vinegar + - repo: tpope/vim-abolish + - repo: tpope/vim-unimpaired + - repo: tpope/vim-speeddating + - repo: godbyk/vim-endwise + branch: patch-1 + - repo: tpope/vim-jdaddy + - repo: tpope/vim-projectionist + + # Still necessary? + - repo: junegunn/fzf + - repo: junegunn/fzf.vim + + # Forgot about this... + - repo: kbenzie/note.vim + + # TODO: Move to tmux role? + # Pack 'christoomey/vim-tmux-navigator' + # Pack 'tmux-plugins/vim-tmux-focus-events' + + - repo: wincent/replay + - repo: andymass/vim-matchup + - repo: dhruvasagar/vim-table-mode + - repo: vim-scripts/DoxygenToolkit.vim + mode: opt + - repo: guns/xterm-color-table.vim + + # Syntax + - repo: kalekundert/vim-coiled-snake + - repo: kbenzie/vim-spirv + - repo: rperier/vim-cmake-syntax + - repo: tikhomirov/vim-glsl + - repo: beyondmarc/hlsl.vim + - repo: frasercrmck/opencl.vim + - repo: asciidoc/vim-asciidoc + - repo: mustache/vim-mustache-handlebars + - repo: joshglendenning/vim-caddyfile + - repo: kbenzie/vim-khr + - repo: jrozner/vim-antlr diff --git a/vimrc b/vimrc index 9b393b9..4fae1be 100644 --- a/vimrc +++ b/vimrc @@ -18,7 +18,7 @@ set packpath+=~/.config/work " tabline.vim - sanely numbered tabs Pack 'mkitt/tabline.vim' -" coc.nvim Conqueror of Completion +" coc.nvim - Conqueror of Completion Pack 'neoclide/coc.nvim', {'branch': 'release'} let g:coc_global_extensions = [ \ 'coc-clangd', @@ -56,7 +56,7 @@ let g:ale_linters = {'c': [], 'cpp': []} let g:ale_cmake_cmakelint_options = \ '-convention/filename,-package/consistency,-package/stdargs' -" Version control differences in the sign column +" vim-signify - Version control differences in the sign column Pack 'mhinz/vim-signify' let g:signify_sign_change = '~' " Conflict marker utilities @@ -165,7 +165,7 @@ let g:rst_syntax_code_list = { \ 'python': ['python'] \ } -" Python folding +" vim-coiled-snake - Python folding Pack 'kalekundert/vim-coiled-snake' " Enable builtin syntax folding