nix: Start on vim plugins

This commit is contained in:
Geoffrey Frogeye 2023-10-29 12:15:56 +01:00
parent e45d3df5cd
commit a521dd4221
Signed by: geoffrey
GPG key ID: C72403E7F82E6AD8
13 changed files with 80 additions and 151 deletions

View file

@ -1,37 +1,3 @@
- name: Set vim variants to use
set_fact:
vim_variants:
- vim
- nvim
# TODO vim-minimal for bsh
# TODO Select those in a clever way
- name: Create vim configuration directory
file:
state: directory
path: "{{ ansible_user_dir }}/.config/{{ item }}"
mode: "u=rwx,g=rx,o=rx"
loop: "{{ vim_variants }}"
- name: Install vim-plug
get_url:
url: https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
dest: "{{ ansible_user_dir }}/.config/vim/plug.vim"
mode: "u=rw,g=r,o=r"
- name: Install loader
template:
src: loader.j2
dest: "{{ ansible_user_dir }}/.config/vim/loader.vim"
mode: "u=rw,g=r,o=r"
- name: Install theme
template:
src: theme.j2
dest: "{{ ansible_user_dir }}/.config/vim/theme.vim"
mode: "u=rw,g=r,o=r"
tags:
- color
- name: Configure vim plugin list
template:

View file

@ -1,6 +0,0 @@
if has('nvim')
let $MYVIMRC="~/.config/nvim/init.vim"
else
let $MYVIMRC="~/.config/vim/init.vim"
endif
source $MYVIMRC

View file

@ -8,11 +8,9 @@
{%- endmacro -%}
" Visuals
{{ use_plugin('base16') }}
{{ use_plugin('devicons') }}
{% if variant == 'nvim' %}
{{ use_plugin('specs') }}
{{ use_plugin('scrollview') }}
{% endif %}
" Theme
@ -20,7 +18,6 @@ source ~/.config/vim/theme.vim
" Status/tab lines
{% if variant == 'nvim' %}
{{ use_plugin('barbar') }}
{{ use_plugin('feline') }}
{% else %}
{{ use_plugin('airline') }}

View file

@ -1,21 +0,0 @@
{{ add_source('romgrk/barbar.nvim') -}}
" Move to previous/next
nmap <silent> <C-H> :BufferPrevious<CR>
nmap <silent> <C-L> :BufferNext<CR>
" Re-order to previous/next
nmap <silent> <Space><C-H> :BufferMovePrevious<CR>
nmap <silent> <Space><C-L> :BufferMoveNext<CR>
" Goto buffer in position...
nmap <silent> <C-1> :BufferGoto 1<CR>
nmap <silent> <C-2> :BufferGoto 2<CR>
nmap <silent> <C-3> :BufferGoto 3<CR>
nmap <silent> <C-4> :BufferGoto 4<CR>
nmap <silent> <C-5> :BufferGoto 5<CR>
nmap <silent> <C-6> :BufferGoto 6<CR>
nmap <silent> <C-7> :BufferGoto 7<CR>
nmap <silent> <C-8> :BufferGoto 8<CR>
nmap <silent> <C-0> :BufferGoto 0<CR>
nmap <silent> <C-0> :BufferLast<CR>
nmap <silent> gb :BufferPick<CR>

View file

@ -1,7 +0,0 @@
{% if variant == 'nvim' %}
{# Beware, doesn't work without RGB colors #}
{{ add_source('RRethy/nvim-base16') -}}
{% else %}
{{ add_source('chriskempson/base16-vim') -}}
{% endif %}

View file

@ -1,2 +0,0 @@
{# Customisable status line #}
{{ add_source('dstein64/nvim-scrollview') -}}

View file

@ -2,8 +2,6 @@
{{ add_source('edluffy/specs.nvim') -}}
lua << EOF
require('specs').setup{
show_jumps = true,
min_jump = 5,
popup = {
delay_ms = 0, -- delay before popup displays
inc_ms = 10, -- time increments used for fade/resize effects
@ -13,9 +11,5 @@ require('specs').setup{
fader = require('specs').pulse_fader,
resizer = require('specs').shrink_resizer
},
ignore_filetypes = {},
ignore_buftypes = {
nofile = true,
},
}
EOF

View file

@ -1 +0,0 @@
colorscheme base16-{{ base16_scheme }}