{ pkgs, ... }: { home.packages = with pkgs; [ astro-language-server marksman nil typescript-language-server ]; programs.neovim = { enable = true; defaultEditor = true; viAlias = true; vimAlias = true; extraConfig = builtins.readFile ./config.vim; plugins = with pkgs.vimPlugins; [ cmp-buffer cmp-cmdline cmp-emoji cmp-nvim-lsp cmp-nvim-ultisnips cmp-path { plugin = fzf-vim; type = "lua"; config = '' vim.api.nvim_set_keymap('n', '', ':Buffers', { noremap = true, silent = true }) vim.api.nvim_set_keymap('i', '', '(fzf-complete-path)', { silent = true }) vim.api.nvim_set_keymap('n', 'o', ':Files', { noremap = true, silent = true }) vim.api.nvim_set_keymap('n', 'O', ':Files ~/', { noremap = true }) vim.api.nvim_set_keymap('n', 'r', ':Read', { noremap = true, silent = true }) vim.api.nvim_set_keymap('n', 'R', ':Read ~/', { noremap = true, silent = true }) vim.api.nvim_set_keymap('n', 'a', ':Ag', { noremap = true, silent = true }) vim.api.nvim_set_keymap('n', 'A', ':Ag ~/', { noremap = true, silent = true }) vim.api.nvim_set_keymap('n', '.', ':Files ~/devel/omniflake/', { noremap = true, silent = true }) vim.api.nvim_create_user_command( 'Read', 'call fzf#run(fzf#wrap({\'sink\': \'read\', \'dir\': }))', { nargs = '?', complete = 'dir' } ) ''; } { plugin = goyo; config = '' nnoremap yog :Goyo nnoremap [og :Goyo 80 nnoremap ]og :Goyo! ''; } { plugin = limelight-vim; config = '' set termguicolors let g:limelight_conceal_ctermfg = 'darkgray' nnoremap yof :Limelight!! nnoremap [of :Limelight nnoremap ]of :Limelight! ''; } nabla-nvim neogit { plugin = nvim-cmp; type = "lua"; config = builtins.readFile ./nvim-cmp.lua; } { plugin = nvim-colorizer-lua; config = "lua require 'colorizer'.setup()"; } { plugin = nvim-lspconfig; type = "lua"; config = '' vim.lsp.enable('astro') vim.lsp.enable('marksman') vim.lsp.enable('nil_ls') vim.lsp.enable('r_language_server') vim.lsp.enable('texlab') vim.lsp.enable('ts_ls') ''; } { plugin = papercolor-theme; config = '' set background=light colorscheme PaperColor ''; } typescript-vim { plugin = ultisnips; type = "lua"; config = '' vim.api.nvim_set_keymap('n', 'se', ':UltiSnipsEdit!', { noremap = true, silent = true }) ''; } vifm-vim { plugin = vim-astro; config = '' let g:astro_typescript = 'enable' ''; } vim-commentary { plugin = vim-easy-align; config = '' xmap ga (EasyAlign) nmap ga (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 SlimeRegionSend nmap s SlimeMotionSend nmap ss SlimeLineSend nnoremap s: :SlimeSend1 ''; } vim-snippets vim-speeddating vim-surround vim-unimpaired vimwiki ]; }; xdg.configFile."nvim" = { source = ./dotfiles; recursive = true; }; home.shellAliases.v = "nvim"; }