nix #11
|
@ -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
|
||||||
|
|
|
@ -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' %}
|
||||||
|
|
|
@ -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()
|
|
|
@ -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' %}
|
||||||
|
|
|
@ -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']
|
|
|
@ -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')
|
|
||||||
\ }))
|
|
|
@ -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,
|
|
||||||
\ })
|
|
|
@ -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()
|
|
|
@ -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 #}
|
|
|
@ -1,2 +0,0 @@
|
||||||
{# Semantic highlighting for Python for neovim #}
|
|
||||||
{{ add_source('numirias/semshi', {'do': ':UpdateRemotePlugins'}) -}}
|
|
|
@ -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
|
|
|
@ -1,2 +0,0 @@
|
||||||
{# Smoooooth scrolling #}
|
|
||||||
{{ add_source('terryma/vim-smooth-scroll') -}}
|
|
|
@ -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>"
|
|
|
@ -1,2 +0,0 @@
|
||||||
{# Debug from the editor #}
|
|
||||||
{{ add_source('idanarye/vim-vebugger') -}}
|
|
|
@ -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",
|
|
||||||
\ }
|
|
Loading…
Reference in a new issue