17 changed files with 277 additions and 11 deletions
-
2config/automatrop/roles/vim/tasks/main.yml
-
3config/automatrop/roles/vim/templates/init.vim.j2
-
29config/automatrop/roles/vim/templates/pluginlist.j2
-
2config/automatrop/roles/vim/templates/plugins/airline.j2
-
21config/automatrop/roles/vim/templates/plugins/barbar.j2
-
7config/automatrop/roles/vim/templates/plugins/colorizer.j2
-
169config/automatrop/roles/vim/templates/plugins/feline.j2
-
8config/automatrop/roles/vim/templates/plugins/lsp_signature.j2
-
6config/automatrop/roles/vim/templates/plugins/lspkind.j2
-
2config/automatrop/roles/vim/templates/plugins/registers.j2
-
2config/automatrop/roles/vim/templates/plugins/scrollview.j2
-
1config/automatrop/roles/vim/templates/plugins/specs.j2
-
26config/automatrop/roles/vim/templates/plugins/symbols-outline.j2
-
2config/automatrop/roles/vim/templates/plugins/telescope.j2
-
3config/automatrop/roles/vim/templates/plugins/undotree.j2
-
4config/automatrop/roles/vim/templates/plugins/vista.j2
-
1config/automatrop/roles/vim/templates/plugins/vsnip.j2
@ -0,0 +1,21 @@ |
|||
{{ 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> |
@ -0,0 +1,7 @@ |
|||
{# Display the actual color for color codes " #} |
|||
{{ add_source('norcalli/nvim-colorizer.lua') -}} |
|||
set termguicolors |
|||
lua << EOF |
|||
require'colorizer'.setup() |
|||
EOF |
|||
{# TODO Enable for css functions too #} |
@ -0,0 +1,169 @@ |
|||
{# Customisable status line #} |
|||
{{ add_source('famiu/feline.nvim') -}} |
|||
set noshowmode |
|||
set laststatus=2 |
|||
lua << EOF |
|||
local base16_colors = require('base16-colorscheme').colors |
|||
local vi_mode_utils = require('feline.providers.vi_mode') |
|||
local lsp = require('feline.providers.lsp') |
|||
require('feline').setup({ |
|||
default_bg = 'base01', |
|||
default_fg = 'base04', |
|||
colors = { |
|||
base00 = base16_colors.base00, |
|||
base01 = base16_colors.base01, |
|||
base02 = base16_colors.base02, |
|||
base03 = base16_colors.base03, |
|||
base04 = base16_colors.base04, |
|||
base05 = base16_colors.base05, |
|||
base06 = base16_colors.base06, |
|||
base07 = base16_colors.base07, |
|||
base08 = base16_colors.base08, |
|||
base09 = base16_colors.base09, |
|||
base0A = base16_colors.base0A, |
|||
base0B = base16_colors.base0B, |
|||
base0C = base16_colors.base0C, |
|||
base0D = base16_colors.base0D, |
|||
base0E = base16_colors.base0E, |
|||
base0F = base16_colors.base0F, |
|||
}, |
|||
components = { |
|||
left = { |
|||
active = { |
|||
{ |
|||
provider = function() return string.format(' %d ', vim.fn.line('$')) end, |
|||
-- If you can, make it depend on the actual bar size |
|||
left_sep = { |
|||
{str = 'block', fg = 'base05'} |
|||
}, |
|||
hl = { |
|||
fg = 'base01', |
|||
bg = 'base04', |
|||
}, |
|||
}, |
|||
{ |
|||
provider = 'vi_mode', |
|||
hl = function() |
|||
return { |
|||
name = vi_mode_utils.get_mode_highlight_name(), |
|||
bg = vi_mode_utils.get_mode_color(), |
|||
fg = 'white', |
|||
style = 'bold', |
|||
} |
|||
end, |
|||
left_sep = {'█'}, |
|||
right_sep = {'█'}, |
|||
}, |
|||
{ |
|||
provider='', |
|||
hl = function() |
|||
return { |
|||
bg = vi_mode_utils.get_mode_color(), |
|||
fg = (vim.bo.modified and 'base09') or 'base0D', |
|||
} |
|||
end, |
|||
}, |
|||
{ |
|||
provider = 'file_info', |
|||
type = 'relative', |
|||
hl = function() |
|||
return { |
|||
fg = 'base06', |
|||
bg = (vim.bo.modified and 'base09') or 'base0D', |
|||
style = 'bold', |
|||
} |
|||
end, |
|||
left_sep = {'█'}, |
|||
right_sep = {'█'}, |
|||
}, |
|||
{ |
|||
provider='', |
|||
hl = function() |
|||
return { |
|||
bg = 'base02', |
|||
fg = (vim.bo.modified and 'base09') or 'base0D', |
|||
} |
|||
end, |
|||
}, |
|||
{ |
|||
provider = 'position', |
|||
hl = { fg = 'base05', bg = 'base02' }, |
|||
right_sep = {'█'}, |
|||
}, |
|||
-- If it miraculously became easy to do, add LSP position here |
|||
{ |
|||
provider='', |
|||
hl = { bg = 'base01', fg = 'base02' }, |
|||
}, |
|||
} |
|||
}, |
|||
right = { |
|||
active = { |
|||
{ |
|||
provider='', |
|||
hl = { bg = 'base03', fg = 'base01', }, |
|||
}, |
|||
{ |
|||
provider='z', |
|||
enabled = function() return next(vim.lsp.buf_get_clients()) == nil end, |
|||
hl = { bg = 'base03', fg = 'base01', }, |
|||
left_sep = '█', |
|||
}, |
|||
{ |
|||
provider = 'diagnostic_errors', |
|||
enabled = function() return lsp.diagnostics_exist('Error') end, |
|||
hl = { fg = 'red', bg = 'base03', }, |
|||
left_sep = '█', |
|||
}, |
|||
{ |
|||
provider = 'diagnostic_warnings', |
|||
enabled = function() return lsp.diagnostics_exist('Warning') end, |
|||
hl = { fg = 'yellow', bg = 'base03', }, |
|||
left_sep = '█', |
|||
}, |
|||
{ |
|||
provider = 'diagnostic_hints', |
|||
enabled = function() return lsp.diagnostics_exist('Hint') end, |
|||
hl = { fg = 'cyan', bg = 'base03', }, |
|||
left_sep = '█', |
|||
}, |
|||
{ |
|||
provider = 'diagnostic_info', |
|||
enabled = function() return lsp.diagnostics_exist('Information') end, |
|||
hl = { fg = 'skyblue', bg = 'base03', }, |
|||
left_sep = '█', |
|||
}, |
|||
{ |
|||
provider='█', |
|||
hl = { bg = 'base02', fg = 'base03', }, |
|||
}, |
|||
{ |
|||
provider = 'git_diff_added', |
|||
hl = { fg = 'green', bg = 'base02', }, |
|||
left_sep = '█', |
|||
enabled = function() return vim.b.gitsigns_status_dict end, |
|||
}, |
|||
{ |
|||
provider = 'git_diff_changed', |
|||
hl = { fg = 'orange', bg = 'base02', }, |
|||
left_sep = '█', |
|||
enabled = function() return vim.b.gitsigns_status_dict end, |
|||
}, |
|||
{ |
|||
provider = 'git_diff_removed', |
|||
hl = { fg = 'red', bg = 'base02', }, |
|||
left_sep = '█', |
|||
enabled = function() return vim.b.gitsigns_status_dict end, |
|||
}, |
|||
{ |
|||
provider = 'git_branch', |
|||
hl = { fg = 'base05', bg = 'base02', style = 'bold', }, |
|||
right_sep = '█', |
|||
left_sep = '█', |
|||
enabled = function() return vim.b.gitsigns_status_dict end, |
|||
}, |
|||
} |
|||
}, |
|||
} |
|||
}) |
|||
EOF |
@ -0,0 +1,8 @@ |
|||
{# Show argument documentation when typing a function #} |
|||
{{ add_source('ray-x/lsp_signature.nvim') -}} |
|||
|
|||
lua << EOF |
|||
require'lsp_signature'.on_attach({ |
|||
hint_enable = false, |
|||
}) |
|||
EOF |
@ -0,0 +1,6 @@ |
|||
{# Add icons to LSP completions #} |
|||
{{ add_source('onsails/lspkind-nvim') -}} |
|||
|
|||
lua << EOF |
|||
require('lspkind').init() |
|||
EOF |
@ -0,0 +1,2 @@ |
|||
{# Show register content when pressing " #} |
|||
{{ add_source('tversteeg/registers.nvim') -}} |
@ -0,0 +1,2 @@ |
|||
{# Customisable status line #} |
|||
{{ add_source('dstein64/nvim-scrollview') -}} |
@ -0,0 +1,26 @@ |
|||
{# Show a symbol panel on the right #} |
|||
{{ add_source('simrat39/symbols-outline.nvim') -}} |
|||
|
|||
nmap <space>s :SymbolsOutline<CR> |
|||
|
|||
lua << EOF |
|||
vim.g.symbols_outline = { |
|||
highlight_hovered_item = true, |
|||
show_guides = true, |
|||
auto_preview = true, |
|||
position = 'right', |
|||
show_numbers = false, |
|||
show_relative_numbers = false, |
|||
show_symbol_details = true, |
|||
keymaps = { |
|||
close = "<Esc>", |
|||
goto_location = "<Cr>", |
|||
focus_location = "o", |
|||
hover_symbol = "<C-space>", |
|||
rename_symbol = "r", |
|||
code_actions = "a", |
|||
}, |
|||
lsp_blacklist = {}, |
|||
} |
|||
EOF |
|||
{# TODO Should be hierarchical, doesn't seem to be :/ #} |
@ -1,2 +1,3 @@ |
|||
{# Navigate undo #} |
|||
{{ add_source('mbbill/undotree') -}} |
|||
nmap <F7> :UndotreeToggle<CR> |
|||
nmap <space>u :UndotreeToggle<CR> |
@ -1,3 +1,4 @@ |
|||
{{ add_source('hrsh7th/vim-vsnip') -}} |
|||
{{ add_source('hrsh7th/vim-vsnip-integ') -}} |
|||
{{ add_source('rafamadriz/friendly-snippets') -}} |
|||
{# TODO Ansible snippets? #} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue