diff --git a/config/automatrop/roles/vim/tasks/main.yml b/config/automatrop/roles/vim/tasks/main.yml index def3f1e..864f679 100644 --- a/config/automatrop/roles/vim/tasks/main.yml +++ b/config/automatrop/roles/vim/tasks/main.yml @@ -1,15 +1,4 @@ -- name: Configure vim plugin list - template: - src: plugininstall.j2 - dest: "{{ ansible_user_dir }}/.config/{{ variant }}/plugininstall.vim" - mode: "u=rw,g=r,o=r" - notify: - - "{{ variant }} plugins changed" - loop: "{{ vim_variants }}" - loop_control: - loop_var: variant - - name: Configure vim template: src: init.vim.j2 diff --git a/config/automatrop/roles/vim/templates/init.vim.j2 b/config/automatrop/roles/vim/templates/init.vim.j2 index d123945..63ecb4d 100644 --- a/config/automatrop/roles/vim/templates/init.vim.j2 +++ b/config/automatrop/roles/vim/templates/init.vim.j2 @@ -9,10 +9,6 @@ call system('mkdir ' . vimDir) let &runtimepath.=','.vimDir set viminfo+=n~/.cache/{{ variant }}/viminfo -" PLUGIN INSTALLATION - -source ~/.config/{{ variant }}/plugininstall.vim - " EDITOR CONFIGURATION {% include 'editor.j2' %} diff --git a/config/automatrop/roles/vim/templates/plugininstall.j2 b/config/automatrop/roles/vim/templates/plugininstall.j2 deleted file mode 100644 index 6747065..0000000 --- a/config/automatrop/roles/vim/templates/plugininstall.j2 +++ /dev/null @@ -1,13 +0,0 @@ -source ~/.config/vim/plug.vim -{% set plugins = namespace(sources=[]) %} -{% import 'pluginlist.j2' as pluginlist with context %} - -call plug#begin('~/.cache/{{ variant }}/plugged') -{% for link, extra in plugins.sources %} -{% if extra %} -Plug '{{ link }}', { {% for k, v in extra.items() %}'{{ k }}': '{{ v }}', {% endfor %} } -{% else %} -Plug '{{ link }}' -{% endif %} -{% endfor %} -call plug#end() diff --git a/config/automatrop/roles/vim/templates/pluginlist.j2 b/config/automatrop/roles/vim/templates/pluginlist.j2 index e592df2..038b99a 100644 --- a/config/automatrop/roles/vim/templates/pluginlist.j2 +++ b/config/automatrop/roles/vim/templates/pluginlist.j2 @@ -1,12 +1,3 @@ -{% macro add_source(link, extra={}) -%} -{% set plugins.sources = plugins.sources + [(link, extra)] %} -{%- endmacro -%} -{% macro use_plugin(name) -%} -" START PLUGIN CONFIG {{ name }} -{% include 'plugins/' + name + '.j2' +%} -" END PLUGIN CONFIG {{ name }} -{%- endmacro -%} - " Visuals {{ use_plugin('devicons') }} {% if variant == 'nvim' %} diff --git a/config/automatrop/roles/vim/templates/plugins/ale.j2 b/config/automatrop/roles/vim/templates/plugins/ale.j2 deleted file mode 100644 index 99040cb..0000000 --- a/config/automatrop/roles/vim/templates/plugins/ale.j2 +++ /dev/null @@ -1,10 +0,0 @@ -" Asynchronous Lint Engine -" LSP client for vim and nvim -{{ add_source('dense-analysis/ale') }} - -nmap :ALEFix - -let g:ale_sign_error = '×' -let g:ale_sign_warning = '!' -let g:ale_completion_enabled = 1 -let g:ale_fixers = ['autopep8', 'shfmt', 'uncrustify', 'remove_trailing_lines', 'trim_whitespace', 'phpcbf'] diff --git a/config/automatrop/roles/vim/templates/plugins/asyncomplete.j2 b/config/automatrop/roles/vim/templates/plugins/asyncomplete.j2 deleted file mode 100644 index dcf0070..0000000 --- a/config/automatrop/roles/vim/templates/plugins/asyncomplete.j2 +++ /dev/null @@ -1,14 +0,0 @@ -{{ add_source('prabirshrestha/asyncomplete.vim') -}} -let g:asyncomplete_auto_popup = 1 -inoremap pumvisible() ? "\" : "\" -inoremap pumvisible() ? "\" : "\" -inoremap pumvisible() ? "\" : "\" -imap (asyncomplete_force_refresh) - -{{ add_source('prabirshrestha/asyncomplete-file.vim') -}} -au User asyncomplete_setup call asyncomplete#register_source(asyncomplete#sources#file#get_source_options({ - \ 'name': 'file', - \ 'whitelist': ['*'], - \ 'priority': 10, - \ 'completor': function('asyncomplete#sources#file#completor') - \ })) diff --git a/config/automatrop/roles/vim/templates/plugins/deoplete.j2 b/config/automatrop/roles/vim/templates/plugins/deoplete.j2 deleted file mode 100644 index 7219c8c..0000000 --- a/config/automatrop/roles/vim/templates/plugins/deoplete.j2 +++ /dev/null @@ -1,26 +0,0 @@ -{# Auto-completion for vim and nvim #} -{% if variant == 'nvim' -%} -{{ add_source('Shougo/deoplete.nvim', {'do': ':UpdateRemotePlugins'}) -}} -{% else -%} -{{ add_source('Shougo/deoplete.nvim') -}} -{{ add_source('roxma/nvim-yarp') -}} -{{ add_source('roxma/vim-hug-neovim-rpc') -}} -{% endif -%} -{% raw %} -let g:deoplete#enable_at_startup = 1 -inoremap -\ pumvisible() ? "\" : -\ check_back_space() ? "\" : -\ deoplete#manual_complete() -function! s:check_back_space() abort "{{{ -let col = col('.') - 1 -return !col || getline('.')[col - 1] =~ '\s' -endfunction"}}} -{% endraw %} - -" suggested by ssemshi to make it not too slow -" let g:deoplete#auto_complete_delay = 100 -call deoplete#custom#option({ -\ 'auto_complete_delay': 100, -\ 'smart_case': v:true, -\ }) diff --git a/config/automatrop/roles/vim/templates/plugins/languageclient.j2 b/config/automatrop/roles/vim/templates/plugins/languageclient.j2 deleted file mode 100644 index 6f319d9..0000000 --- a/config/automatrop/roles/vim/templates/plugins/languageclient.j2 +++ /dev/null @@ -1,20 +0,0 @@ -{{ add_source('autozimu/LanguageClient-neovim', { 'branch': 'next', 'do': 'bash install.sh'}) -}} - -let g:LanguageClient_serverCommands = { - \ 'python': ['pyls'], - \ 'sh': ['bash-language-server', 'start'], - \ } -let g:LanguageClient_loggingFile = expand('~/.cache/{{ variant }}/LanguageClient.log') - -function LC_maps() - if has_key(g:LanguageClient_serverCommands, &filetype) - nnoremap K :call LanguageClient#textDocument_hover() - nnoremap gd :call LanguageClient#textDocument_definition() - nnoremap gD :call LanguageClient#textDocument_references() - nnoremap :call LanguageClient#textDocument_rename() - nnoremap :call LanguageClient#textDocument_formatting() - set completefunc=LanguageClient#complete - set omnifunc=LanguageClient#complete - endif -endfunction -autocmd FileType * call LC_maps() diff --git a/config/automatrop/roles/vim/templates/plugins/reload.j2 b/config/automatrop/roles/vim/templates/plugins/reload.j2 deleted file mode 100644 index 483001f..0000000 --- a/config/automatrop/roles/vim/templates/plugins/reload.j2 +++ /dev/null @@ -1,4 +0,0 @@ -{# Live reload #} -{{ add_source('famiu/nvim-reload') -}} -{{ add_source('nvim-lua/plenary.nvim') -}} -{# Not used, this breaks color, and source $MYVIMRC is all that we need to reload colorscheme #} diff --git a/config/automatrop/roles/vim/templates/plugins/semshi.j2 b/config/automatrop/roles/vim/templates/plugins/semshi.j2 deleted file mode 100644 index 1a77fe0..0000000 --- a/config/automatrop/roles/vim/templates/plugins/semshi.j2 +++ /dev/null @@ -1,2 +0,0 @@ -{# Semantic highlighting for Python for neovim #} -{{ add_source('numirias/semshi', {'do': ':UpdateRemotePlugins'}) -}} diff --git a/config/automatrop/roles/vim/templates/plugins/shade.j2 b/config/automatrop/roles/vim/templates/plugins/shade.j2 deleted file mode 100644 index 1cddf54..0000000 --- a/config/automatrop/roles/vim/templates/plugins/shade.j2 +++ /dev/null @@ -1,6 +0,0 @@ -{# Dim inactive windows #} -{# Not working very well, at least with undotree #} -{{add_source('sunjon/shade.nvim')-}} -lua << EOF -require'shade'.setup() -EOF diff --git a/config/automatrop/roles/vim/templates/plugins/smooth_scroll.j2 b/config/automatrop/roles/vim/templates/plugins/smooth_scroll.j2 deleted file mode 100644 index 36d9752..0000000 --- a/config/automatrop/roles/vim/templates/plugins/smooth_scroll.j2 +++ /dev/null @@ -1,2 +0,0 @@ -{# Smoooooth scrolling #} -{{ add_source('terryma/vim-smooth-scroll') -}} diff --git a/config/automatrop/roles/vim/templates/plugins/supertab.j2 b/config/automatrop/roles/vim/templates/plugins/supertab.j2 deleted file mode 100644 index 8b3abb6..0000000 --- a/config/automatrop/roles/vim/templates/plugins/supertab.j2 +++ /dev/null @@ -1,7 +0,0 @@ -{# Use TAB for autocompletion #} -{{ add_source('ervandew/supertab') -}} -let g:SuperTabLongestEnhanced = 1 -let g:SuperTabLongestHighlight = 1 -{# TODO longest doesn't work, even when longest is set in completeopt #} -let g:SuperTabDefaultCompletionType = "" " Go down when completing -let g:SuperTabContextDefaultCompletionType = "" diff --git a/config/automatrop/roles/vim/templates/plugins/vebugger.j2 b/config/automatrop/roles/vim/templates/plugins/vebugger.j2 deleted file mode 100644 index 013a066..0000000 --- a/config/automatrop/roles/vim/templates/plugins/vebugger.j2 +++ /dev/null @@ -1,2 +0,0 @@ -{# Debug from the editor #} -{{ add_source('idanarye/vim-vebugger') -}} diff --git a/config/automatrop/roles/vim/templates/plugins/vista.j2 b/config/automatrop/roles/vim/templates/plugins/vista.j2 deleted file mode 100644 index 20cc836..0000000 --- a/config/automatrop/roles/vim/templates/plugins/vista.j2 +++ /dev/null @@ -1,12 +0,0 @@ -{# Tag bar #} -{{ add_source('liuchengxu/vista.vim') -}} -nmap s :Vista!! -let g:vista_icon_indent = ["▸ ", ""] - -let g:vista#renderer#enable_icon = 1 - -" The default icons can't be suitable for all the filetypes, you can extend it as you wish. -let g:vista#renderer#icons = { -\ "function": "f", -\ "variable": "x", -\ }