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
|
@ -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,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
|
|
@ -20,7 +20,6 @@
|
|||
jq
|
||||
universal-ctags
|
||||
highlight
|
||||
ripgrep # For nvim's :Telescope live_grep
|
||||
zeal-qt6 # Offline documentation
|
||||
|
||||
# Docker
|
||||
|
|
|
@ -28,10 +28,59 @@ in
|
|||
|
||||
# Tabline
|
||||
barbar.enable = true;
|
||||
|
||||
# Go to whatever
|
||||
telescope = {
|
||||
enable = true;
|
||||
# FIXME Crashes nvim on startup, complaining about some keymap
|
||||
# keymaps = {
|
||||
# gF = "find_files";
|
||||
# gf = "git_files";
|
||||
# gB = "buffers";
|
||||
# gl = "current_buffer_fuzzy_find";
|
||||
# gL = "live_grep";
|
||||
# gT = "tags";
|
||||
# gt = "treesitter";
|
||||
# gm = "marks";
|
||||
# gh = "oldfiles";
|
||||
# gH = "command_history";
|
||||
# gS = "search_history";
|
||||
# gC = "commands";
|
||||
# gr = "lsp_references";
|
||||
# ga = "lsp_code_actions";
|
||||
# ge = "lsp_document_diagnostics";
|
||||
# gE = "lsp_workspace_diagnostics";
|
||||
# gd = "lsp_definitions";
|
||||
# gs = "lsp_document_symbols";
|
||||
# };
|
||||
defaults = {
|
||||
vimgrep_arguments = [
|
||||
"${pkgs.ripgrep}/bin/rg"
|
||||
"--color=never"
|
||||
"--no-heading"
|
||||
"--with-filename"
|
||||
"--line-number"
|
||||
"--column"
|
||||
"--smart-case"
|
||||
];
|
||||
};
|
||||
extensions.fzf-native = {
|
||||
enable = true;
|
||||
caseMode = "smart_case";
|
||||
fuzzy = true;
|
||||
overrideFileSorter = true;
|
||||
overrideGenericSorter = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
extraPlugins = with pkgs.vimPlugins; [
|
||||
nvim-scrollview
|
||||
|
||||
# Status line
|
||||
feline-nvim # TODO Abandonned. Maybe use lualine?
|
||||
];
|
||||
extraConfigLua = "${builtins.readFile ./vim/feline.lua}";
|
||||
|
||||
# 23.11: Use keymaps, seems better
|
||||
maps = {
|
||||
# barbar
|
||||
|
|
|
@ -1,32 +1,33 @@
|
|||
{# Customisable status line #}
|
||||
{{ add_source('famiu/feline.nvim') -}}
|
||||
vim.cmd([[
|
||||
set noshowmode
|
||||
set laststatus=2
|
||||
lua << EOF
|
||||
local base16_colors = require('base16-colorscheme').colors
|
||||
]])
|
||||
-- local base16_colors = require('base16-colorscheme').colors
|
||||
-- FIXME Color setting doesn't work, see ./feline_test.vim for a reproducible use case
|
||||
-- that works on Arch but not on Nix (with Plug stuff removed)
|
||||
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,
|
||||
},
|
||||
-- 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 = {
|
||||
{
|
||||
|
@ -164,4 +165,3 @@ require('feline').setup({
|
|||
},
|
||||
}
|
||||
})
|
||||
EOF
|
9
config/nix/hm/vim/feline_test.vim
Normal file
9
config/nix/hm/vim/feline_test.vim
Normal file
|
@ -0,0 +1,9 @@
|
|||
source ~/.config/vim/plug.vim
|
||||
call plug#begin('~/.cache/nvim/plugged')
|
||||
Plug 'RRethy/nvim-base16'
|
||||
call plug#end()
|
||||
|
||||
colorscheme base16-solarized-dark
|
||||
lua << EOF
|
||||
a = require('base16-colorscheme').colors.base00
|
||||
EOF
|
Loading…
Reference in a new issue