{ config, pkgs, stdenv, lib, ... }:
let
my-vim-easy-align = {
plugin = pkgs.vimPlugins.vim-easy-align;
config = ''
" Start interactive EasyAlign in visual mode (e.g. vipga)
xmap ga <Plug>(EasyAlign)
" Start interactive EasyAlign for a motion/text object (e.g. gaip)
nmap ga <Plug>(EasyAlign)
let g:easy_align_delimiters = {
\ '>': { 'pattern': '>>\|=>\|>' },
\ '/': {
\ 'pattern': '//\+\|/\*\|\*/',
\ 'delimiter_align': 'l',
\ 'ignore_groups': ['!Comment'] },
\ ']': {
\ 'pattern': '[\]]',
\ 'left_margin': 0,
\ 'right_margin': 0,
\ 'stick_to_left': 0
\ },
\ '[': {
\ 'pattern': '[\[]',
\ 'left_margin': 0,
\ 'right_margin': 0,
\ 'stick_to_left': 0
\ },
\ ')': {
\ 'pattern': '[)]',
\ 'left_margin': 0,
\ 'right_margin': 0,
\ 'stick_to_left': 0
\ },
\ '(': {
\ 'pattern': '[(]',
\ 'left_margin': 0,
\ 'right_margin': 0,
\ 'stick_to_left': 0
\ },
\ }
'';
};
in {
programs.neovim = {
plugins = [
my-vim-easy-align
];
};
}