nvim as import
This commit is contained in:
parent
af7b41f563
commit
d0a624b436
2 changed files with 130 additions and 126 deletions
128
home/default.nix
128
home/default.nix
|
|
@ -32,135 +32,11 @@
|
|||
vdirsyncer
|
||||
];
|
||||
|
||||
modules = [
|
||||
imports = [
|
||||
./R.nix
|
||||
./nvim.nix
|
||||
];
|
||||
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
# todo: pandoc, completion, lsp
|
||||
{
|
||||
plugin = fzf-vim;
|
||||
config = ''
|
||||
let maplocalleader="\\"
|
||||
let mapleader=" "
|
||||
nnoremap <leader><tab> :Buffers<return>
|
||||
imap <c-x><c-f> <Plug>(fzf-complete-path)
|
||||
nnoremap <leader>o :Files<return>
|
||||
nnoremap <leader>O :Files ~/
|
||||
nnoremap <leader>r :Read<cr>
|
||||
nnoremap <leader>a :Ag<cr>
|
||||
nnoremap <leader>b :Buffers<cr>
|
||||
nnoremap <leader>. :Files ~/.config/<return>
|
||||
command! -nargs=? -complete=dir Read call fzf#run(
|
||||
\fzf#wrap({'sink': 'read', 'dir': <q-args>})
|
||||
\)
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
plugin = goyo;
|
||||
config = ''
|
||||
nnoremap yog :Goyo<return>
|
||||
nnoremap [og :Goyo 80<return>
|
||||
nnoremap ]og :Goyo!<return>
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
plugin = limelight-vim;
|
||||
config = ''
|
||||
set termguicolors
|
||||
let g:limelight_conceal_ctermfg = 'darkgray'
|
||||
nnoremap yof :Limelight!!<return>
|
||||
nnoremap [of :Limelight<return>
|
||||
nnoremap ]of :Limelight!<return>
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
plugin = nvim-colorizer-lua;
|
||||
config = "lua require 'colorizer'.setup()";
|
||||
}
|
||||
|
||||
{
|
||||
plugin = papercolor-theme;
|
||||
config = ''
|
||||
set background=light
|
||||
colorscheme PaperColor
|
||||
'';
|
||||
}
|
||||
|
||||
typescript-vim
|
||||
|
||||
{
|
||||
plugin = ultisnips;
|
||||
config = "nnoremap <leader>se :UltiSnipsEdit!<return>";
|
||||
}
|
||||
|
||||
vim-commentary
|
||||
{
|
||||
plugin = vim-easy-align;
|
||||
config = ''
|
||||
xmap ga <Plug>(EasyAlign)
|
||||
nmap ga <Plug>(EasyAlign)
|
||||
'';
|
||||
}
|
||||
vim-fish
|
||||
vim-nix
|
||||
vim-repeat
|
||||
{
|
||||
plugin = vim-slime;
|
||||
config = ''
|
||||
let g:slime_target = "tmux"
|
||||
let g:slime_default_config = {"socket_name": get(split($TMUX, ","), 0), "target_pane": ":.1"}
|
||||
let g:slime_no_mappings = 1
|
||||
let g:slime_dont_ask_default = 1
|
||||
xmap s <plug>SlimeRegionSend
|
||||
nmap s <plug>SlimeMotionSend
|
||||
nmap ss <plug>SlimeLineSend
|
||||
nnoremap s: :SlimeSend1
|
||||
" let g:slime_target = "neovim"
|
||||
" autocmd TermOpen * let g:slime_default_config = {"jobid": &channel}
|
||||
'';
|
||||
}
|
||||
vim-snippets
|
||||
vim-speeddating
|
||||
vim-surround
|
||||
vim-unimpaired
|
||||
];
|
||||
extraConfig = ''
|
||||
let mapleader=" "
|
||||
let maplocalleader="\\"
|
||||
|
||||
set colorcolumn=+1
|
||||
set expandtab
|
||||
set ignorecase
|
||||
set iskeyword+=ä,Ä,ö,Ö,ü,Ü,ß
|
||||
set linebreak
|
||||
set list listchars=tab:»\ ,trail:·,nbsp:~
|
||||
set number
|
||||
set relativenumber
|
||||
set scrolloff=7
|
||||
set shell=/bin/sh
|
||||
set shiftwidth=2
|
||||
set shortmess=FfmnxoTIc
|
||||
set signcolumn=no
|
||||
set smartcase
|
||||
set softtabstop=2
|
||||
set spelllang=en_us,de_20
|
||||
set splitbelow
|
||||
set splitright
|
||||
set tabstop=2
|
||||
set updatetime=300
|
||||
|
||||
let g:netrw_liststyle = 3
|
||||
let g:netrw_fastbrowse = 0
|
||||
'';
|
||||
};
|
||||
|
||||
home.shellAliases = {
|
||||
ls = "exa";
|
||||
tree = "exa --tree";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue