refactor
This commit is contained in:
parent
7f9c096123
commit
26ed81dbee
36 changed files with 165 additions and 207 deletions
|
|
@ -1,4 +1,4 @@
|
|||
{ config, pkgs, ... }:
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
|
|
@ -12,6 +12,8 @@
|
|||
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
|
||||
extraConfig = builtins.readFile ./config.vim;
|
||||
|
||||
|
|
@ -33,19 +35,22 @@
|
|||
|
||||
{
|
||||
plugin = fzf-vim;
|
||||
type = "lua";
|
||||
config = ''
|
||||
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>R :Read ~/
|
||||
nnoremap <leader>a :Ag<cr>
|
||||
nnoremap <leader>b :Buffers<cr>
|
||||
nnoremap <leader>. :Files ~/devel/omniflake/<return>
|
||||
command! -nargs=? -complete=dir Read call fzf#run(
|
||||
\fzf#wrap({'sink': 'read', 'dir': <q-args>})
|
||||
\)
|
||||
vim.api.nvim_set_keymap('n', '<leader><tab>', ':Buffers<return>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('i', '<c-x><c-f>', '<Plug>(fzf-complete-path)', { silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<leader>o', ':Files<return>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<leader>O', ':Files ~/', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<leader>r', ':Read<return>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<leader>R', ':Read ~/', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<leader>a', ':Ag<return>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<leader>A', ':Ag ~/', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<leader>.', ':Files ~/devel/omniflake/<return>', { noremap = true, silent = true })
|
||||
vim.api.nvim_create_user_command(
|
||||
'Read',
|
||||
'call fzf#run(fzf#wrap({\'sink\': \'read\', \'dir\': <q-args>}))',
|
||||
{ nargs = '?', complete = 'dir' }
|
||||
)
|
||||
'';
|
||||
}
|
||||
{
|
||||
|
|
@ -80,8 +85,9 @@
|
|||
typescript-vim
|
||||
{
|
||||
plugin = ultisnips;
|
||||
type = "lua";
|
||||
config = ''
|
||||
nnoremap <leader>se :UltiSnipsEdit!<return>
|
||||
vim.api.nvim_set_keymap('n', '<leader>se', ':UltiSnipsEdit!<return>', { noremap = true, silent = true })
|
||||
'';
|
||||
}
|
||||
vifm-vim
|
||||
|
|
@ -113,8 +119,6 @@
|
|||
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
|
||||
|
|
@ -123,12 +127,11 @@
|
|||
vim-unimpaired
|
||||
];
|
||||
};
|
||||
xdg.configFile."nvim/autocommmands.vim".source = ./autocommands.vim;
|
||||
xdg.configFile."nvim/ftplugin/markdown.vim".source = ./ftplugin/markdown.vim;
|
||||
xdg.configFile."nvim/after/ftplugin/markdown.vim".source = ./after/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/ftplugin/tex.vim".source = ./ftplugin/tex.vim;
|
||||
xdg.configFile."nvim/ftplugin/typescript.vim".source = ./ftplugin/typescript.vim;
|
||||
xdg.configFile."nvim/syntax/rmd.vim".source = ./syntax/rmd.vim;
|
||||
|
||||
xdg.configFile."nvim" = {
|
||||
source = ./dotfiles;
|
||||
recursive = true;
|
||||
};
|
||||
|
||||
home.shellAliases.v = "nvim";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue