nix #11
|
@ -16,30 +16,6 @@
|
||||||
" Theme
|
" Theme
|
||||||
source ~/.config/vim/theme.vim
|
source ~/.config/vim/theme.vim
|
||||||
|
|
||||||
" Search/replace
|
|
||||||
{{ use_plugin('abolish') }}
|
|
||||||
{{ use_plugin('easy_align') }}
|
|
||||||
|
|
||||||
" Sourounding pairs
|
|
||||||
{{ use_plugin('surround') }}
|
|
||||||
{{ use_plugin('targets') }}
|
|
||||||
|
|
||||||
" f/F mode
|
|
||||||
{{ use_plugin('shot_f') }}
|
|
||||||
{{ use_plugin('quick_scope') }}
|
|
||||||
|
|
||||||
" Registers
|
|
||||||
{{ use_plugin('registers') }}
|
|
||||||
|
|
||||||
|
|
||||||
" Tags/Symbols
|
|
||||||
{{ use_plugin('gutentags') }}
|
|
||||||
{% if variant == 'nvim' %}
|
|
||||||
{{ use_plugin('symbols-outline') }}
|
|
||||||
{% else %}
|
|
||||||
{{ use_plugin('vista') }}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
" Language Server Client
|
" Language Server Client
|
||||||
{% if variant == 'nvim' %}
|
{% if variant == 'nvim' %}
|
||||||
{{ use_plugin('nvim_lspconfig') }}
|
{{ use_plugin('nvim_lspconfig') }}
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
{# Regex for words, with case in mind #}
|
|
||||||
{{ add_source('tpope/tpope-vim-abolish') -}}
|
|
|
@ -1,4 +0,0 @@
|
||||||
{# Aligning lines around a certain character #}
|
|
||||||
{{ add_source('junegunn/vim-easy-align') -}}
|
|
||||||
" Align GitHub-flavored Markdown tables
|
|
||||||
au FileType markdown vmap <Bar> :EasyAlign*<Bar><Enter>
|
|
|
@ -1,3 +0,0 @@
|
||||||
{# Generate tags #}
|
|
||||||
{{ add_source('ludovicchabant/vim-gutentags') -}}
|
|
||||||
let g:gutentags_cache_dir = expand('~/.cache/{{ variant }}/tags')
|
|
|
@ -1,2 +0,0 @@
|
||||||
{# Auto-highlight one character per word for quick f/F movement #}
|
|
||||||
{{ add_source('unblevable/quick-scope') -}}
|
|
|
@ -1,2 +0,0 @@
|
||||||
{# Show register content when pressing " #}
|
|
||||||
{{ add_source('tversteeg/registers.nvim') -}}
|
|
|
@ -1,2 +0,0 @@
|
||||||
{# When in f/F/t/T mode, highlight in red the characters that can be jumped to #}
|
|
||||||
{{ add_source('deris/vim-shot-f') -}}
|
|
|
@ -1,2 +0,0 @@
|
||||||
{# Change surroundings pairs (e.g. brackets, quotes… #}
|
|
||||||
{{ add_source('tpope/vim-surround') -}}
|
|
|
@ -1,2 +0,0 @@
|
||||||
{# Better interaction with surrounding pairs #}
|
|
||||||
{{ add_source('wellle/targets.vim') -}}
|
|
|
@ -4,6 +4,28 @@ let
|
||||||
url = "https://github.com/nix-community/nixvim";
|
url = "https://github.com/nix-community/nixvim";
|
||||||
ref = "nixos-23.05";
|
ref = "nixos-23.05";
|
||||||
});
|
});
|
||||||
|
vim-shot-f = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||||
|
pname = "vim-shot-f";
|
||||||
|
version = "2016-02-05";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "deris";
|
||||||
|
repo = "vim-shot-f";
|
||||||
|
rev = "eea71d2a1038aa87fe175de9150b39dc155e5e7f";
|
||||||
|
sha256 = "iAPvIs/lhW+w5kFTZKaY97D/kfCGtqKrJVFvZ8cHu+c=";
|
||||||
|
};
|
||||||
|
meta.homepage = "https://github.com/deris/vim-shot-f";
|
||||||
|
};
|
||||||
|
quick-scope = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||||
|
pname = "quick-scope";
|
||||||
|
version = "2.6.1";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "deris";
|
||||||
|
repo = "quick-scope";
|
||||||
|
rev = "2.6.1";
|
||||||
|
sha256 = "iAPvIs/lhW+w5kFTZKaY97D/kfCGtqKrJVFvZ8cHu+c=";
|
||||||
|
};
|
||||||
|
meta.homepage = "https://github.com/unblevable/quick-scope";
|
||||||
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
@ -72,14 +94,50 @@ in
|
||||||
overrideGenericSorter = true;
|
overrideGenericSorter = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Surrounding pairs
|
||||||
|
surround.enable = true; # Change surrounding pairs (e.g. brackets, quotes)
|
||||||
};
|
};
|
||||||
extraPlugins = with pkgs.vimPlugins; [
|
extraPlugins = with pkgs.vimPlugins; [
|
||||||
nvim-scrollview
|
nvim-scrollview # Scroll bar
|
||||||
|
|
||||||
# Status line
|
# Status line
|
||||||
feline-nvim # TODO Abandonned. Maybe use lualine?
|
feline-nvim # Customizable status line.
|
||||||
|
# TODO Abandonned. Maybe use lualine?
|
||||||
|
|
||||||
|
# Search/replace
|
||||||
|
vim-abolish # Regex for words, with case in mind
|
||||||
|
vim-easy-align # Aligning lines around a certain character
|
||||||
|
|
||||||
|
# Surrounding pairs
|
||||||
|
targets-vim # Better interaction with surrounding pairs
|
||||||
|
|
||||||
|
# f/F mode
|
||||||
|
vim-shot-f # Highlight relevant characters for f/F/t/T modes
|
||||||
|
quick-scope # Highlight relevant characters for f/F modes one per word but always
|
||||||
|
# FIXME Doesn't work here, :QuickScopeToggle doesn't even work
|
||||||
|
|
||||||
|
# Registers
|
||||||
|
registers-nvim # Show register content when pressing "
|
||||||
|
# TODO Doesn't work. Didn't work on Arch either
|
||||||
|
|
||||||
|
# Tags
|
||||||
|
vim-gutentags # Generate tags
|
||||||
|
symbols-outline-nvim # Show a symbol panel on the right
|
||||||
|
# TODO Fails on startup. Same on Arch. Config issue?
|
||||||
|
];
|
||||||
|
extraConfigLua = lib.strings.concatMapStringsSep "\n" (f: builtins.readFile f) [
|
||||||
|
./vim/feline.lua
|
||||||
|
./vim/symbols-outline-nvim.lua
|
||||||
|
];
|
||||||
|
extraConfigVim = ''
|
||||||
|
" vim-gutentags
|
||||||
|
let g:gutentags_cache_dir = expand('~/.cache/nvim/tags')
|
||||||
|
'';
|
||||||
|
autoCmd = [
|
||||||
|
# vim-easy-align: Align Markdown tables
|
||||||
|
{ event = "FileType markdown"; command = "vmap <Bar> :EasyAlign*<Bar><Enter>"; }
|
||||||
];
|
];
|
||||||
extraConfigLua = "${builtins.readFile ./vim/feline.lua}";
|
|
||||||
|
|
||||||
# 23.11: Use keymaps, seems better
|
# 23.11: Use keymaps, seems better
|
||||||
maps = {
|
maps = {
|
||||||
|
@ -103,6 +161,9 @@ in
|
||||||
normal."gb" = { action = "<Cmd>BufferPick<CR>"; silent = true; };
|
normal."gb" = { action = "<Cmd>BufferPick<CR>"; silent = true; };
|
||||||
# TODO Other useful options?
|
# TODO Other useful options?
|
||||||
|
|
||||||
|
# symbols-outline-nvim
|
||||||
|
normal."<Space>s" = { action = "<Cmd>SymbolsOutline<CR>"; silent = true; };
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,3 @@
|
||||||
{# Show a symbol panel on the right #}
|
|
||||||
{{ add_source('simrat39/symbols-outline.nvim') -}}
|
|
||||||
|
|
||||||
nmap <space>s :SymbolsOutline<CR>
|
|
||||||
|
|
||||||
lua << EOF
|
|
||||||
vim.g.symbols_outline = {
|
vim.g.symbols_outline = {
|
||||||
highlight_hovered_item = true,
|
highlight_hovered_item = true,
|
||||||
show_guides = true,
|
show_guides = true,
|
||||||
|
@ -22,5 +16,4 @@ vim.g.symbols_outline = {
|
||||||
},
|
},
|
||||||
lsp_blacklist = {},
|
lsp_blacklist = {},
|
||||||
}
|
}
|
||||||
EOF
|
-- TODO Should be hierarchical, doesn't seem to be :/
|
||||||
{# TODO Should be hierarchical, doesn't seem to be :/ #}
|
|
Loading…
Reference in a new issue