141 lines
3.8 KiB
Nix
141 lines
3.8 KiB
Nix
{ pkgs, ... }:
|
|
let
|
|
vim-goyo = pkgs.vimUtils.buildVimPlugin {
|
|
name = "vim-goyo";
|
|
src = pkgs.fetchFromGitHub {
|
|
owner = "junegunn";
|
|
repo = "goyo.vim";
|
|
rev = "6b6ed2734084fdbb6315357ddcaecf9c8e6f143d";
|
|
sha256 = "1ywlz1hn54kxyp5q0angriaarimq7ys7m6sk6l4x8jr1g2yh0afz";
|
|
};
|
|
};
|
|
|
|
vim-nix = pkgs.vimUtils.buildVimPlugin {
|
|
name = "vim-nix";
|
|
src = pkgs.fetchFromGitHub {
|
|
owner = "LnL7";
|
|
repo = "vim-nix";
|
|
rev = "d733cb96707a2a6bdc6102b6d89f947688e0e959";
|
|
sha256 = "12k2gwm8b1n02361gpjhsldql99yd7qsh80a3lbwc5c5gz5j8jsb";
|
|
};
|
|
};
|
|
|
|
vim-catppuccino = pkgs.vimUtils.buildVimPlugin {
|
|
name = "vim-catppuccino";
|
|
src = pkgs.fetchFromGitHub {
|
|
owner = "Pocco81";
|
|
repo = "Catppuccino.nvim";
|
|
rev = "014d8575acdd19ecef4ecb12fc82a2e21794b548";
|
|
sha256 = "0i0p21jkrx99n3dnm5xvnw8n963c67l4lgl4iwngz0psdzwxphkw";
|
|
};
|
|
};
|
|
in
|
|
with builtins;
|
|
{
|
|
programs.neovim = {
|
|
enable = true;
|
|
vimAlias = true;
|
|
plugins = with pkgs.vimPlugins; [
|
|
vim-sensible
|
|
vim-startify
|
|
vim-catppuccino
|
|
|
|
{
|
|
plugin = fzf-vim;
|
|
config = ''
|
|
noremap <leader>fc :BCommits<CR>
|
|
'';
|
|
}
|
|
vim-elixir
|
|
alchemist-vim
|
|
vim-nix
|
|
vim-javascript
|
|
vim-json
|
|
vim-jsx-pretty
|
|
|
|
vim-commentary
|
|
vim-airline
|
|
{
|
|
plugin = rainbow;
|
|
config = ''
|
|
let g:rainbow_conf = {
|
|
\ 'guifgs': ['RoyalBlue3', 'SeaGreen3', 'DarkOrchid3', 'firebrick3', 'RoyalBlue3', 'SeaGreen3', 'DarkOrchid3', 'firebrick3', 'RoyalBlue3', 'DarkOrchid3', 'firebrick3', 'RoyalBlue3', 'SeaGreen3', 'DarkOrchid3', 'firebrick3'],
|
|
\ 'ctermfgs': ['red', 'brown', 'blue', 'gray', 'green', 'magenta', 'cyan', 'darkred', 'brown', 'darkblue', 'gray', 'darkgreen', 'darkmagenta', 'darkcyan', 'red'],
|
|
\ 'parentheses': ['start=/(/ end=/)/ fold', 'start=/\[/ end=/\]/ fold', 'start=/{/ end=/}/ fold']
|
|
\}
|
|
let g:rainbow_active = 1
|
|
'';
|
|
}
|
|
{
|
|
plugin = vim-indent-guides;
|
|
config = ''
|
|
let g:indent_guides_enable_on_vim_startup = 1
|
|
let g:indent_guides_start_level = 2
|
|
'';
|
|
}
|
|
vim-surround
|
|
{
|
|
plugin = git-blame-nvim;
|
|
config = ''
|
|
let g:gitblame_date_format = '%Y-%m-%d'
|
|
nnoremap gC :GitBlameOpenCommitURL<CR>
|
|
'';
|
|
}
|
|
{
|
|
plugin = neogit;
|
|
config = ''
|
|
noremap <leader>g :Neogit<CR>
|
|
'';
|
|
}
|
|
vinegar
|
|
{
|
|
plugin = gitsigns-nvim;
|
|
config = ''
|
|
lua << EOF
|
|
require('gitsigns').setup()
|
|
EOF
|
|
'';
|
|
}
|
|
undotree
|
|
vim-goyo
|
|
{
|
|
plugin = nvim-cmp;
|
|
config = ''
|
|
lua << EOF
|
|
${ readFile (./nvim-cmp.lua) }
|
|
EOF
|
|
'';
|
|
}
|
|
luasnip
|
|
cmp-nvim-lsp
|
|
{
|
|
plugin = nvim-lspconfig;
|
|
config = ''
|
|
lua << EOF
|
|
${readFile (
|
|
pkgs.substituteAll {
|
|
src = ./nvim-lspconfig.lua;
|
|
# since both of these are used for actually configuring the system,
|
|
# we'll probably always want them around.
|
|
lua_ls = pkgs.sumneko-lua-language-server;
|
|
rnix_lsp = pkgs.rnix-lsp;
|
|
}
|
|
) }
|
|
EOF
|
|
'';
|
|
}
|
|
{
|
|
plugin = telescope-nvim;
|
|
config = ''
|
|
nnoremap <leader>ff <cmd>lua require('telescope.builtin').find_files()<cr>
|
|
nnoremap <leader>fg <cmd>lua require('telescope.builtin').live_grep()<cr>
|
|
nnoremap <leader>fb <cmd>lua require('telescope.builtin').buffers()<cr>
|
|
nnoremap <leader>fh <cmd>lua require('telescope.builtin').help_tags()<cr>
|
|
'';
|
|
}
|
|
];
|
|
|
|
extraConfig = readFile ./init.vim;
|
|
};
|
|
|
|
}
|