everythign is easier than i think
This commit is contained in:
parent
d0a624b436
commit
92f7a4c2a2
4 changed files with 78 additions and 30 deletions
106
home/nvim/default.nix
Normal file
106
home/nvim/default.nix
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.neovim = {
|
||||
extraConfig = import ./config.vim;
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
# todo: SNIPPETS 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
|
||||
];
|
||||
};
|
||||
xdg.configFile."nvim/autocommmands.vim".source = ./autocommands.vim;
|
||||
xdg.configFile."nvim/ftplugin/markdown.vim".source = ./ftplugin/markdown.vim;
|
||||
xdg.configFile."nvim/ftplugin/r.vim".source = ./ftplugin/r.vim;
|
||||
xdg.configFile."nvim/ftplugin/rmd.vim".source = ./ftplugin/rmd.vim;
|
||||
xdg.configFile."nvim/syntax/rmd.vim".source = ./syntax/rmd.vim;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue