nix: More vim plugins
With broken things. But debugging this with a half system, and not a very quick way of rebuilding is not neat. So let's postpone the fixes to after everything I could import easily is imported, and maybe once I have a home-manager test env.
This commit is contained in:
parent
1139bd6524
commit
f16367105d
8 changed files with 85 additions and 145 deletions
|
|
@ -16,20 +16,6 @@
|
|||
" Theme
|
||||
source ~/.config/vim/theme.vim
|
||||
|
||||
" Status/tab lines
|
||||
{% if variant == 'nvim' %}
|
||||
{{ use_plugin('feline') }}
|
||||
{% else %}
|
||||
{{ use_plugin('airline') }}
|
||||
{% endif %}
|
||||
|
||||
" Goto utilities
|
||||
{% if variant == 'nvim' %}
|
||||
{{ use_plugin('telescope') }}
|
||||
{% else %}
|
||||
{{ use_plugin('fzf') }}
|
||||
{% endif %}
|
||||
|
||||
" Search/replace
|
||||
{{ use_plugin('abolish') }}
|
||||
{{ use_plugin('easy_align') }}
|
||||
|
|
|
|||
|
|
@ -1,15 +0,0 @@
|
|||
{{ add_source('vim-airline/vim-airline') -}}
|
||||
{{ add_source('vim-airline/vim-airline-themes') -}}
|
||||
set noshowmode
|
||||
set laststatus=2
|
||||
let g:airline_powerline_fonts = 1
|
||||
{% if variant != 'nvim' %}
|
||||
let g:airline#extensions#tabline#enabled = 1
|
||||
{% endif %}
|
||||
|
||||
let g:airline_section_a = airline#section#create(['mode'])
|
||||
let g:airline_section_b = airline#section#create(['branch', 'hunks'])
|
||||
" let g:airline_section_z = airline#section#create(['%B', '@', '%l', ':', '%c'])
|
||||
|
||||
let airline#extensions#languageclient#error_symbol = '✖ '
|
||||
let airline#extensions#languageclient#warning_symbol = '⚠ '
|
||||
|
|
@ -1,167 +0,0 @@
|
|||
{# 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',
|
||||
theme = {
|
||||
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 = {
|
||||
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' },
|
||||
},
|
||||
},
|
||||
{
|
||||
{
|
||||
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(vim.diagnostic.severity.ERROR) end,
|
||||
hl = { fg = 'red', bg = 'base03', },
|
||||
left_sep = '█',
|
||||
},
|
||||
{
|
||||
provider = 'diagnostic_warnings',
|
||||
enabled = function() return lsp.diagnostics_exist(vim.diagnostic.severity.WARN) end,
|
||||
hl = { fg = 'yellow', bg = 'base03', },
|
||||
left_sep = '█',
|
||||
},
|
||||
{
|
||||
provider = 'diagnostic_hints',
|
||||
enabled = function() return lsp.diagnostics_exist(vim.diagnostic.severity.HINT) end,
|
||||
hl = { fg = 'cyan', bg = 'base03', },
|
||||
left_sep = '█',
|
||||
},
|
||||
{
|
||||
provider = 'diagnostic_info',
|
||||
enabled = function() return lsp.diagnostics_exist(vim.diagnostic.severity.INFO) 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
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
{# Fuzzy matching for all kind of stuff #}
|
||||
{{ add_source('junegunn/fzf', {'do': './install --bin'}) }}
|
||||
{{ add_source('junegunn/fzf.vim') -}}
|
||||
let g:fzf_layout = { 'down': '~40%' }
|
||||
let g:fzf_colors =
|
||||
\ { 'fg': ['fg', 'Normal'],
|
||||
\ 'bg': ['bg', 'Normal'],
|
||||
\ 'hl': ['fg', 'Comment'],
|
||||
\ 'fg+': ['fg', 'CursorLine', 'CursorColumn', 'Normal'],
|
||||
\ 'bg+': ['bg', 'CursorLine', 'CursorColumn'],
|
||||
\ 'hl+': ['fg', 'Statement'],
|
||||
\ 'info': ['fg', 'PreProc'],
|
||||
\ 'border': ['fg', 'Ignore'],
|
||||
\ 'prompt': ['fg', 'Conditional'],
|
||||
\ 'pointer': ['fg', 'Exception'],
|
||||
\ 'marker': ['fg', 'Keyword'],
|
||||
\ 'spinner': ['fg', 'Label'],
|
||||
\ 'header': ['fg', 'Comment'] }
|
||||
|
||||
let g:fzf_command_prefix = 'Fzf'
|
||||
nmap gF :FzfFiles<CR>
|
||||
nmap gf :FzfGFiles<CR>
|
||||
nmap gb :FzfBuffers<CR>
|
||||
nmap gL :FzfLines<CR>
|
||||
nmap gl :FzfBLines<CR>
|
||||
nmap gT :FzfTags<CR>
|
||||
nmap gt :FzfBTags<CR>
|
||||
nmap gm :FzfMarks<CR>
|
||||
nmap gw :FzfWindows<CR>
|
||||
nmap gh :FzfHistory<CR>
|
||||
nmap gH :FzfHistory:<CR>
|
||||
nmap gS :FzfHistory/<CR>
|
||||
nmap gs :FzfSnippets<CR>
|
||||
|
||||
" TODO `gd` → go to tag matching selected word, or show a list with that
|
||||
" of tags pre-filtered with that word
|
||||
|
|
@ -1,52 +0,0 @@
|
|||
{{ add_source('nvim-telescope/telescope.nvim') -}}
|
||||
{# Dependencies #}
|
||||
{{ add_source('nvim-lua/popup.nvim') -}}
|
||||
{{ add_source('nvim-lua/plenary.nvim') -}}
|
||||
{# Extensions #}
|
||||
{{ add_source('nvim-telescope/telescope-fzf-native.nvim', {'do': 'make'}) -}}
|
||||
|
||||
noremap gF <cmd>Telescope find_files<cr>
|
||||
noremap gf <cmd>Telescope git_files<cr>
|
||||
noremap gB <cmd>Telescope buffers<cr>
|
||||
noremap gl <cmd>Telescope current_buffer_fuzzy_find<cr>
|
||||
noremap gL <cmd>Telescope live_grep<cr>
|
||||
noremap gT <cmd>Telescope tags<cr>
|
||||
noremap gt <cmd>Telescope treesitter<cr>
|
||||
noremap gm <cmd>Telescope marks<cr>
|
||||
noremap gh <cmd>Telescope oldfiles<cr>
|
||||
noremap gH <cmd>Telescope command_history<cr>
|
||||
noremap gS <cmd>Telescope search_history<cr>
|
||||
noremap gC <cmd>Telescope commands<cr>
|
||||
noremap gr <cmd>Telescope lsp_references<cr>
|
||||
noremap ga <cmd>Telescope lsp_code_actions<cr>
|
||||
vnoremap ga <cmd>Telescope lsp_range_code_actions<cr>
|
||||
noremap ge <cmd>Telescope lsp_document_diagnostics<cr>
|
||||
noremap gE <cmd>Telescope lsp_workspace_diagnostics<cr>
|
||||
noremap gd <cmd>Telescope lsp_definitions<cr>
|
||||
noremap gs <cmd>Telescope lsp_document_symbols<cr>
|
||||
|
||||
lua << EOF
|
||||
require('telescope').setup{
|
||||
defaults = {
|
||||
vimgrep_arguments = {
|
||||
'rg',
|
||||
'--color=never',
|
||||
'--no-heading',
|
||||
'--with-filename',
|
||||
'--line-number',
|
||||
'--column',
|
||||
'--smart-case'
|
||||
},
|
||||
},
|
||||
extensions = {
|
||||
fzf = {
|
||||
fuzzy = true, -- false will only do exact matching
|
||||
override_generic_sorter = true, -- override the generic sorter
|
||||
override_file_sorter = true, -- override the file sorter
|
||||
case_mode = "smart_case", -- or "ignore_case" or "respect_case"
|
||||
-- the default case_mode is "smart_case"
|
||||
}
|
||||
}
|
||||
}
|
||||
require('telescope').load_extension('fzf')
|
||||
EOF
|
||||
Loading…
Add table
Add a link
Reference in a new issue