2023-01-28 20:49:10 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}: 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) [
|
|
|
|
ccls
|
|
|
|
gopls
|
|
|
|
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
|
|
|
|
python39Packages.python-lsp-server
|
|
|
|
python3Full
|
|
|
|
solargraph
|
|
|
|
rnix-lsp
|
|
|
|
rust-analyzer
|
|
|
|
terraform-ls
|
|
|
|
universal-ctags
|
|
|
|
];
|
2021-05-30 19:10:28 +00:00
|
|
|
|
|
|
|
plugins = with pkgs.vimPlugins; [
|
2022-01-05 21:56:03 +00:00
|
|
|
nvim-cmp
|
|
|
|
cmp-nvim-lsp
|
|
|
|
cmp_luasnip
|
|
|
|
luasnip
|
|
|
|
|
|
|
|
lsp_extensions-nvim
|
2021-05-30 19:10:28 +00:00
|
|
|
nvim-lspconfig
|
|
|
|
|
2022-10-18 14:24:43 +00:00
|
|
|
instant-nvim-nvfetcher
|
2021-12-02 11:19:37 +00:00
|
|
|
|
2021-05-30 19:10:28 +00:00
|
|
|
ack-vim
|
2022-04-03 16:34:46 +00:00
|
|
|
vim-airline
|
2021-05-30 19:10:28 +00:00
|
|
|
editorconfig-vim
|
|
|
|
nnn-vim
|
2022-03-15 16:20:25 +00:00
|
|
|
quick-scope
|
2022-04-09 14:47:28 +00:00
|
|
|
suda-vim
|
2021-10-29 14:44:35 +00:00
|
|
|
syntastic
|
|
|
|
vim-gutentags
|
|
|
|
vim-vinegar
|
2022-10-18 14:24:43 +00:00
|
|
|
vim-workspace-nvfetcher
|
2021-05-30 19:10:28 +00:00
|
|
|
|
|
|
|
sonokai
|
2022-04-09 14:47:28 +00:00
|
|
|
vim-hybrid-material
|
|
|
|
vim-airline-themes
|
2022-10-18 14:24:43 +00:00
|
|
|
vim-apprentice-nvfetcher
|
2021-05-30 19:10:28 +00:00
|
|
|
|
|
|
|
fugitive
|
|
|
|
vim-gitgutter
|
2021-10-29 14:44:35 +00:00
|
|
|
vim-rhubarb
|
2022-10-18 14:24:43 +00:00
|
|
|
vimagit-nvfetcher
|
2021-05-30 19:10:28 +00:00
|
|
|
|
|
|
|
fzf-vim
|
|
|
|
fzfWrapper
|
2021-10-29 14:44:35 +00:00
|
|
|
vim-highlightedyank
|
2021-05-30 19:10:28 +00:00
|
|
|
|
2022-10-18 14:24:43 +00:00
|
|
|
vim-beautify-nvfetcher
|
2021-05-30 19:10:28 +00:00
|
|
|
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
|
2022-10-18 14:24:43 +00:00
|
|
|
vim-caddyfile-nvfetcher
|
2021-05-30 19:10:28 +00:00
|
|
|
vim-go
|
|
|
|
vim-javascript
|
|
|
|
vim-json
|
2022-01-19 00:13:15 +00:00
|
|
|
SchemaStore-nvim
|
2021-05-30 19:10:28 +00:00
|
|
|
vim-markdown
|
2021-10-29 14:44:35 +00:00
|
|
|
vim-nix
|
2022-08-02 13:31:27 +00:00
|
|
|
vim-nixhash
|
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
|
|
|
];
|
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
|
|
|
];
|
|
|
|
}
|