2021-05-30 19:10:28 +00:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
let
|
|
|
|
psCfg = config.pub-solar;
|
|
|
|
xdg = config.home-manager.users."${psCfg.user.name}".xdg;
|
|
|
|
|
2021-11-29 18:06:10 +00:00
|
|
|
preview-file = pkgs.writeShellScriptBin "preview-file" (import ./preview-file.nix pkgs);
|
|
|
|
|
2021-05-30 19:10:28 +00:00
|
|
|
sonokai = pkgs.vimUtils.buildVimPlugin {
|
|
|
|
name = "sonokai";
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "sainnhe";
|
|
|
|
repo = "sonokai";
|
|
|
|
rev = "51e7ee8b13f9c2e4eae33f8d745eaa1f320b0ae6";
|
|
|
|
sha256 = "0svqr6dnpk2p5qhb6j0rllns8f0f4886wxpx69wgazjx84bx728i";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
suda = pkgs.vimUtils.buildVimPlugin {
|
|
|
|
name = "suda";
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "lambdalisue";
|
|
|
|
repo = "suda.vim";
|
|
|
|
rev = "fbb138f5090c3db4dabeba15326397a09df6b73b";
|
|
|
|
sha256 = "ztZ5UPd2y4Mkore/QLfMCwjM0Qy4eWCOw535NzDSfgY=";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
workspace = pkgs.vimUtils.buildVimPlugin {
|
|
|
|
name = "vim-workspace";
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "thaerkh";
|
|
|
|
repo = "vim-workspace";
|
|
|
|
rev = "faa835406990171bbbeff9254303dad49bad17cb";
|
|
|
|
sha256 = "w6CcFcIplwUVcvx54rbTwThBxus1k7yHot2TpdNQ61M=";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
beautify = pkgs.vimUtils.buildVimPlugin {
|
|
|
|
name = "vim-beautify";
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "zeekay";
|
|
|
|
repo = "vim-beautify";
|
|
|
|
rev = "e0691483927dc5a0c051433602397419f9628623";
|
|
|
|
sha256 = "QPTCl6KaGcAjTS5yVDov9yxmv0fDaFoPLMsrtVIG6GQ=";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
in
|
|
|
|
{
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
viAlias = true;
|
|
|
|
vimAlias = true;
|
|
|
|
vimdiffAlias = true;
|
|
|
|
|
|
|
|
withNodeJs = true;
|
|
|
|
withRuby = true;
|
|
|
|
withPython3 = true;
|
|
|
|
|
|
|
|
extraConfig = builtins.concatStringsSep "\n" [
|
|
|
|
''
|
|
|
|
" Persistent undo
|
|
|
|
set undofile
|
|
|
|
set undodir=${xdg.cacheHome}/nvim/undo
|
|
|
|
|
|
|
|
set backupdir=${xdg.dataHome}/nvim/backup
|
|
|
|
set directory=${xdg.dataHome}/nvim/swap/
|
|
|
|
''
|
|
|
|
(builtins.readFile ./init.vim)
|
|
|
|
(builtins.readFile ./plugins.vim)
|
|
|
|
(builtins.readFile ./clipboard.vim)
|
|
|
|
(builtins.readFile ./ui.vim)
|
|
|
|
(builtins.readFile ./quickfixopenall.vim)
|
|
|
|
(builtins.readFile ./lsp.vim)
|
2021-11-29 18:06:10 +00:00
|
|
|
''
|
|
|
|
" fzf with file preview
|
|
|
|
command! -bang -nargs=? -complete=dir Files
|
|
|
|
\ call fzf#vim#files(<q-args>, { 'options': ['--keep-right', '--cycle', '--layout', 'reverse', '--preview', '${preview-file}/bin/preview-file {}'] }, <bang>0)
|
|
|
|
''
|
2021-05-30 19:10:28 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
extraPackages = with pkgs; [
|
2021-10-29 14:44:35 +00:00
|
|
|
ccls
|
|
|
|
gopls
|
|
|
|
nodejs
|
2021-05-30 19:10:28 +00:00
|
|
|
nodePackages.bash-language-server
|
|
|
|
nodePackages.dockerfile-language-server-nodejs
|
|
|
|
nodePackages.svelte-language-server
|
|
|
|
nodePackages.typescript
|
2021-10-29 14:44:35 +00:00
|
|
|
nodePackages.typescript-language-server
|
2021-05-30 19:10:28 +00:00
|
|
|
nodePackages.vim-language-server
|
|
|
|
nodePackages.vue-language-server
|
|
|
|
nodePackages.vscode-css-languageserver-bin
|
2021-10-29 14:44:35 +00:00
|
|
|
nodePackages.vscode-html-languageserver-bin
|
|
|
|
nodePackages.vscode-json-languageserver-bin
|
|
|
|
nodePackages.yaml-language-server
|
2021-05-30 19:10:28 +00:00
|
|
|
python-language-server
|
2021-10-29 14:44:35 +00:00
|
|
|
python3Full
|
2021-05-30 19:10:28 +00:00
|
|
|
solargraph
|
|
|
|
rnix-lsp
|
2021-10-29 14:44:35 +00:00
|
|
|
rust-analyzer
|
2021-05-30 19:10:28 +00:00
|
|
|
terraform-ls
|
2021-10-29 14:44:35 +00:00
|
|
|
universal-ctags
|
2021-05-30 19:10:28 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
plugins = with pkgs.vimPlugins; [
|
|
|
|
completion-nvim
|
2021-10-29 14:44:35 +00:00
|
|
|
lsp_extensions-nvim
|
|
|
|
nvim-lspconfig
|
2021-05-30 19:10:28 +00:00
|
|
|
|
|
|
|
ack-vim
|
|
|
|
airline
|
|
|
|
editorconfig-vim
|
|
|
|
nnn-vim
|
2021-10-29 14:44:35 +00:00
|
|
|
suda
|
|
|
|
syntastic
|
|
|
|
vim-gutentags
|
|
|
|
vim-vinegar
|
|
|
|
workspace
|
2021-05-30 19:10:28 +00:00
|
|
|
|
|
|
|
sonokai
|
|
|
|
|
|
|
|
fugitive
|
|
|
|
vim-gitgutter
|
2021-10-29 14:44:35 +00:00
|
|
|
vim-rhubarb
|
2021-05-30 19:10:28 +00:00
|
|
|
vimagit
|
|
|
|
|
|
|
|
fzf-vim
|
|
|
|
fzfWrapper
|
2021-10-29 14:44:35 +00:00
|
|
|
vim-highlightedyank
|
2021-05-30 19:10:28 +00:00
|
|
|
|
|
|
|
beautify
|
|
|
|
vim-surround
|
|
|
|
|
|
|
|
vim-bufkill
|
2021-10-29 14:44:35 +00:00
|
|
|
vim-sensible
|
2021-05-30 19:10:28 +00:00
|
|
|
|
|
|
|
ansible-vim
|
|
|
|
emmet-vim
|
|
|
|
rust-vim
|
|
|
|
vim-go
|
|
|
|
vim-javascript
|
|
|
|
vim-json
|
|
|
|
vim-markdown
|
2021-10-29 14:44:35 +00:00
|
|
|
vim-nix
|
2021-05-30 19:10:28 +00:00
|
|
|
vim-ruby
|
|
|
|
vim-toml
|
2021-10-29 14:44:35 +00:00
|
|
|
vim-vue
|
|
|
|
yats-vim
|
2021-05-30 19:10:28 +00:00
|
|
|
];
|
|
|
|
}
|