2023-01-28 20:49:10 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
pkgs,
|
2022-12-26 14:06:47 +00:00
|
|
|
lib,
|
2023-01-28 20:49:10 +00:00
|
|
|
...
|
|
|
|
}: let
|
2021-05-30 19:10:28 +00:00
|
|
|
psCfg = config.pub-solar;
|
2022-08-14 15:17:35 +00:00
|
|
|
cfg = config.pub-solar.terminal-life;
|
2021-05-30 19:10:28 +00:00
|
|
|
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);
|
2023-01-28 20:49:10 +00:00
|
|
|
in {
|
2021-05-30 19:10:28 +00:00
|
|
|
enable = true;
|
|
|
|
|
|
|
|
viAlias = true;
|
|
|
|
vimAlias = true;
|
|
|
|
vimdiffAlias = true;
|
|
|
|
|
|
|
|
withNodeJs = true;
|
|
|
|
withRuby = true;
|
|
|
|
withPython3 = true;
|
|
|
|
|
2023-01-28 20:49:10 +00:00
|
|
|
extraPackages = with pkgs;
|
|
|
|
lib.mkIf (!cfg.lite) [
|
2023-06-09 15:06:11 +00:00
|
|
|
ansible-language-server
|
2023-01-28 20:49:10 +00:00
|
|
|
ccls
|
|
|
|
gopls
|
2023-07-02 00:50:01 +00:00
|
|
|
nixd
|
2023-01-28 20:49:10 +00:00
|
|
|
nodejs
|
|
|
|
nodePackages.bash-language-server
|
|
|
|
nodePackages.dockerfile-language-server-nodejs
|
|
|
|
nodePackages.svelte-language-server
|
|
|
|
nodePackages.typescript
|
|
|
|
nodePackages.typescript-language-server
|
|
|
|
nodePackages.vim-language-server
|
|
|
|
nodePackages.vue-language-server
|
|
|
|
nodePackages.vscode-langservers-extracted
|
|
|
|
nodePackages.yaml-language-server
|
2023-05-17 21:56:46 +00:00
|
|
|
python3Packages.python-lsp-server
|
2023-01-28 20:49:10 +00:00
|
|
|
python3Full
|
|
|
|
rust-analyzer
|
2023-07-02 00:50:01 +00:00
|
|
|
solargraph
|
2023-01-28 20:49:10 +00:00
|
|
|
terraform-ls
|
|
|
|
universal-ctags
|
|
|
|
];
|
2021-05-30 19:10:28 +00:00
|
|
|
|
2023-03-27 08:45:49 +00:00
|
|
|
plugins = with pkgs.vimPlugins;
|
|
|
|
[]
|
|
|
|
++ lib.optionals (!cfg.lite) [
|
|
|
|
nvim-cmp
|
|
|
|
cmp-nvim-lsp
|
|
|
|
cmp_luasnip
|
|
|
|
luasnip
|
|
|
|
|
|
|
|
lsp_extensions-nvim
|
|
|
|
nvim-lspconfig
|
|
|
|
|
|
|
|
instant-nvim-nvfetcher
|
|
|
|
|
|
|
|
ack-vim
|
|
|
|
vim-airline
|
|
|
|
editorconfig-vim
|
|
|
|
nnn-vim
|
|
|
|
quick-scope
|
|
|
|
suda-vim
|
|
|
|
syntastic
|
|
|
|
vim-gutentags
|
|
|
|
vim-vinegar
|
|
|
|
vim-workspace-nvfetcher
|
|
|
|
|
|
|
|
sonokai
|
|
|
|
vim-hybrid-material
|
|
|
|
vim-airline-themes
|
|
|
|
vim-apprentice-nvfetcher
|
|
|
|
|
|
|
|
fugitive
|
|
|
|
vim-gitgutter
|
|
|
|
vim-rhubarb
|
|
|
|
vimagit-nvfetcher
|
|
|
|
|
|
|
|
fzf-vim
|
|
|
|
fzfWrapper
|
|
|
|
vim-highlightedyank
|
|
|
|
|
|
|
|
vim-beautify-nvfetcher
|
|
|
|
vim-surround
|
|
|
|
|
|
|
|
vim-bufkill
|
|
|
|
vim-sensible
|
|
|
|
|
|
|
|
ansible-vim
|
|
|
|
emmet-vim
|
|
|
|
rust-vim
|
|
|
|
vim-caddyfile-nvfetcher
|
|
|
|
vim-go
|
|
|
|
vim-javascript
|
|
|
|
vim-json
|
|
|
|
SchemaStore-nvim
|
|
|
|
vim-markdown
|
|
|
|
vim-nix
|
|
|
|
vim-nixhash
|
|
|
|
vim-ruby
|
|
|
|
vim-toml
|
|
|
|
vim-vue
|
|
|
|
yats-vim
|
|
|
|
];
|
2021-12-02 11:19:37 +00:00
|
|
|
|
|
|
|
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)
|
|
|
|
''
|
|
|
|
" 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
|
|
|
];
|
|
|
|
}
|