137 lines
3.7 KiB
Nix
137 lines
3.7 KiB
Nix
{ 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-nvim-lsp
|
|
cmp-buffer
|
|
cmp-emoji
|
|
cmp-path
|
|
cmp-cmdline
|
|
cmp-nvim-ultisnips
|
|
nvim-cmp
|
|
|
|
{
|
|
plugin = nvim-lspconfig;
|
|
type = "lua";
|
|
config = builtins.readFile ./lsp.lua;
|
|
}
|
|
|
|
{
|
|
plugin = fzf-vim;
|
|
type = "lua";
|
|
config = ''
|
|
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' }
|
|
)
|
|
'';
|
|
}
|
|
{
|
|
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;
|
|
type = "lua";
|
|
config = ''
|
|
vim.api.nvim_set_keymap('n', '<leader>se', ':UltiSnipsEdit!<return>', { noremap = true, silent = true })
|
|
'';
|
|
}
|
|
vifm-vim
|
|
{
|
|
plugin = vim-astro;
|
|
config = ''
|
|
let g:astro_typescript = 'enable'
|
|
'';
|
|
}
|
|
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
|
|
'';
|
|
}
|
|
vim-snippets
|
|
vim-speeddating
|
|
vim-surround
|
|
vim-unimpaired
|
|
];
|
|
};
|
|
|
|
xdg.configFile."nvim" = {
|
|
source = ./dotfiles;
|
|
recursive = true;
|
|
};
|
|
|
|
home.shellAliases.v = "nvim";
|
|
}
|