nix: vim: plugins cleanup

This commit is contained in:
Geoffrey Frogeye 2023-11-02 15:46:23 +01:00
parent d811d025e6
commit 3d9dc4a4bf
Signed by: geoffrey
GPG key ID: C72403E7F82E6AD8
15 changed files with 0 additions and 142 deletions

View file

@ -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 - name: Configure vim
template: template:
src: init.vim.j2 src: init.vim.j2

View file

@ -9,10 +9,6 @@ call system('mkdir ' . vimDir)
let &runtimepath.=','.vimDir let &runtimepath.=','.vimDir
set viminfo+=n~/.cache/{{ variant }}/viminfo set viminfo+=n~/.cache/{{ variant }}/viminfo
" PLUGIN INSTALLATION
source ~/.config/{{ variant }}/plugininstall.vim
" EDITOR CONFIGURATION " EDITOR CONFIGURATION
{% include 'editor.j2' %} {% include 'editor.j2' %}

View file

@ -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()

View file

@ -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 " Visuals
{{ use_plugin('devicons') }} {{ use_plugin('devicons') }}
{% if variant == 'nvim' %} {% if variant == 'nvim' %}

View file

@ -1,10 +0,0 @@
" Asynchronous Lint Engine
" LSP client for vim and nvim
{{ add_source('dense-analysis/ale') }}
nmap <F3> :ALEFix<CR>
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']

View file

@ -1,14 +0,0 @@
{{ add_source('prabirshrestha/asyncomplete.vim') -}}
let g:asyncomplete_auto_popup = 1
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<cr>"
imap <c-space> <Plug>(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')
\ }))

View file

@ -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 <silent><expr> <TAB>
\ pumvisible() ? "\<C-n>" :
\ <SID>check_back_space() ? "\<TAB>" :
\ 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,
\ })

View file

@ -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 <buffer> <silent> K :call LanguageClient#textDocument_hover()<cr>
nnoremap <buffer> <silent> gd :call LanguageClient#textDocument_definition()<CR>
nnoremap <buffer> <silent> gD :call LanguageClient#textDocument_references()<CR>
nnoremap <buffer> <silent> <F2> :call LanguageClient#textDocument_rename()<CR>
nnoremap <buffer> <silent> <F3> :call LanguageClient#textDocument_formatting()<CR>
set completefunc=LanguageClient#complete
set omnifunc=LanguageClient#complete
endif
endfunction
autocmd FileType * call LC_maps()

View file

@ -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 #}

View file

@ -1,2 +0,0 @@
{# Semantic highlighting for Python for neovim #}
{{ add_source('numirias/semshi', {'do': ':UpdateRemotePlugins'}) -}}

View file

@ -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

View file

@ -1,2 +0,0 @@
{# Smoooooth scrolling #}
{{ add_source('terryma/vim-smooth-scroll') -}}

View file

@ -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 = "<c-n>" " Go down when completing
let g:SuperTabContextDefaultCompletionType = "<c-n>"

View file

@ -1,2 +0,0 @@
{# Debug from the editor #}
{{ add_source('idanarye/vim-vebugger') -}}

View file

@ -1,12 +0,0 @@
{# Tag bar #}
{{ add_source('liuchengxu/vista.vim') -}}
nmap <space>s :Vista!!<CR>
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",
\ }