2021-05-30 19:10:28 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
pkgs,
|
2022-12-26 14:06:47 +00:00
|
|
|
lib,
|
2021-05-30 19:10:28 +00:00
|
|
|
...
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
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;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
viAlias = true;
|
|
|
|
vimAlias = true;
|
|
|
|
vimdiffAlias = true;
|
|
|
|
|
|
|
|
withNodeJs = true;
|
|
|
|
withRuby = true;
|
|
|
|
withPython3 = true;
|
|
|
|
|
2024-08-19 08:18:12 +00:00
|
|
|
extraPackages = with pkgs; [
|
|
|
|
ripgrep
|
|
|
|
nixd
|
|
|
|
universal-ctags
|
|
|
|
# ansible-language-server
|
|
|
|
# clang-tools
|
|
|
|
# gopls
|
2024-08-19 10:35:36 +00:00
|
|
|
nodePackages.bash-language-server
|
2024-08-19 08:18:12 +00:00
|
|
|
# nodePackages.svelte-language-server
|
|
|
|
# nodePackages.typescript
|
|
|
|
# nodePackages.typescript-language-server
|
|
|
|
# nodePackages.vue-language-server
|
2024-08-21 14:05:37 +00:00
|
|
|
nodePackages.vscode-langservers-extracted
|
2024-08-19 08:18:12 +00:00
|
|
|
# nginx-language-server
|
|
|
|
# lua-language-server
|
|
|
|
# cmake-language-server
|
|
|
|
# vim-language-server
|
2024-08-19 10:35:36 +00:00
|
|
|
yaml-language-server
|
|
|
|
nodePackages.dockerfile-language-server-nodejs
|
|
|
|
docker-compose-language-service
|
2024-08-19 08:18:12 +00:00
|
|
|
# rust-analyzer
|
|
|
|
# cargo
|
|
|
|
# solargraph
|
|
|
|
# terraform-ls
|
|
|
|
];
|
2024-01-14 22:06:40 +00:00
|
|
|
|
2024-08-19 08:18:12 +00:00
|
|
|
plugins =
|
|
|
|
with pkgs.vimPlugins;
|
|
|
|
[
|
2023-11-10 18:48:06 +00:00
|
|
|
# The status bar in the bottom of the screen with the mode indication and file location
|
|
|
|
vim-airline
|
2024-08-19 10:38:46 +00:00
|
|
|
|
2023-11-10 18:48:06 +00:00
|
|
|
# Automatically load editorconfig files in repos to configure nvim settings
|
|
|
|
editorconfig-vim
|
2024-08-19 10:38:46 +00:00
|
|
|
|
2023-11-10 18:48:06 +00:00
|
|
|
# File browser. Use <leader>n to access
|
|
|
|
nnn-vim
|
2024-08-19 10:38:46 +00:00
|
|
|
|
2023-11-10 18:48:06 +00:00
|
|
|
# Highlight characters when using f, F, t, and T
|
|
|
|
quick-scope
|
2024-08-19 10:38:46 +00:00
|
|
|
|
2023-11-10 18:48:06 +00:00
|
|
|
# Undo history etc. per project
|
|
|
|
vim-workspace-nvfetcher
|
2024-08-19 10:38:46 +00:00
|
|
|
|
2023-11-10 18:48:06 +00:00
|
|
|
# Neovim colorschemes / themes
|
|
|
|
sonokai
|
|
|
|
vim-hybrid-material
|
|
|
|
vim-airline-themes
|
|
|
|
vim-apprentice-nvfetcher
|
2024-08-19 10:38:46 +00:00
|
|
|
|
2023-11-10 18:48:06 +00:00
|
|
|
# Git integrations
|
|
|
|
# A Git wrapper so awesome, it should be illegal
|
|
|
|
fugitive
|
|
|
|
# Shows git diff markers in the sign column
|
|
|
|
vim-gitgutter
|
|
|
|
# GitHub extension for fugitive
|
|
|
|
vim-rhubarb
|
|
|
|
# Ease your git workflow within Vim
|
|
|
|
vimagit-nvfetcher
|
2024-08-19 10:38:46 +00:00
|
|
|
|
2024-08-19 08:18:12 +00:00
|
|
|
# Telescope fuzzy finder
|
|
|
|
telescope-nvim
|
|
|
|
telescope-fzf-native-nvim
|
2024-08-19 10:38:46 +00:00
|
|
|
|
2023-11-10 18:48:06 +00:00
|
|
|
# Make the yanked region apparent
|
|
|
|
vim-highlightedyank
|
2024-08-19 10:38:46 +00:00
|
|
|
|
2023-11-10 18:48:06 +00:00
|
|
|
# :Beautify Code beautifier
|
|
|
|
vim-beautify-nvfetcher
|
2024-08-19 10:38:46 +00:00
|
|
|
|
2023-11-10 18:48:06 +00:00
|
|
|
# Unload, delete or wipe a buffer without closing the window
|
|
|
|
vim-bufkill
|
2024-08-19 10:38:46 +00:00
|
|
|
|
2023-11-10 18:48:06 +00:00
|
|
|
# Defaults everyone can agree on
|
|
|
|
vim-sensible
|
2024-08-19 10:38:46 +00:00
|
|
|
|
2024-08-19 08:18:12 +00:00
|
|
|
# Single tabpage interface for easily cycling through diffs for all modified files
|
|
|
|
diffview-nvim
|
2024-08-19 10:38:46 +00:00
|
|
|
|
2024-08-19 08:18:12 +00:00
|
|
|
# Work with tags files
|
|
|
|
vim-gutentags
|
|
|
|
]
|
|
|
|
++ (
|
|
|
|
if cfg.full then
|
|
|
|
[
|
2024-11-11 17:01:48 +00:00
|
|
|
(pkgs.vimPlugins.nvim-treesitter.withPlugins (p: [
|
|
|
|
p.csv
|
|
|
|
p.ini
|
|
|
|
p.json
|
|
|
|
p.json5
|
|
|
|
p.markdown
|
|
|
|
p.nix
|
|
|
|
p.toml
|
|
|
|
p.xml
|
|
|
|
p.yaml
|
|
|
|
|
|
|
|
p.css
|
|
|
|
p.graphql
|
|
|
|
p.html
|
|
|
|
p.javascript
|
|
|
|
p.scss
|
|
|
|
p.tsx
|
|
|
|
p.typescript
|
|
|
|
p.vue
|
|
|
|
|
|
|
|
p.c
|
|
|
|
p.cpp
|
|
|
|
p.go
|
|
|
|
p.gomod
|
|
|
|
p.gosum
|
|
|
|
p.haskell
|
|
|
|
p.lua
|
|
|
|
p.php
|
|
|
|
p.python
|
|
|
|
p.requirements
|
|
|
|
p.ruby
|
|
|
|
p.rust
|
|
|
|
|
|
|
|
p.vim
|
|
|
|
p.vimdoc
|
|
|
|
|
|
|
|
p.passwd
|
|
|
|
p.sql
|
|
|
|
|
|
|
|
p.diff
|
|
|
|
p.gitcommit
|
|
|
|
p.gitignore
|
|
|
|
p.git_config
|
|
|
|
p.gitattributes
|
|
|
|
p.git_rebase
|
|
|
|
p.ssh_config
|
|
|
|
p.ledger
|
|
|
|
|
|
|
|
p.bash
|
|
|
|
p.cmake
|
|
|
|
p.make
|
|
|
|
p.meson
|
|
|
|
p.mermaid
|
|
|
|
p.ninja
|
|
|
|
|
|
|
|
p.dockerfile
|
|
|
|
p.hcl
|
|
|
|
p.helm
|
|
|
|
p.terraform
|
|
|
|
]))
|
2024-08-19 10:38:46 +00:00
|
|
|
|
2024-08-19 08:18:12 +00:00
|
|
|
# Dependencies for nvim-lspconfig
|
|
|
|
nvim-cmp
|
|
|
|
cmp-nvim-lsp
|
|
|
|
cmp_luasnip
|
|
|
|
luasnip
|
2024-08-19 10:38:46 +00:00
|
|
|
|
2024-08-19 08:18:12 +00:00
|
|
|
# Quickstart configs for neovim LSP
|
|
|
|
lsp_extensions-nvim
|
|
|
|
nvim-lspconfig
|
2024-08-19 10:38:46 +00:00
|
|
|
|
2024-08-19 08:18:12 +00:00
|
|
|
# Collaborative editing in Neovim using built-in capabilities
|
|
|
|
instant-nvim-nvfetcher
|
2024-08-19 10:38:46 +00:00
|
|
|
|
2023-11-10 18:48:06 +00:00
|
|
|
# Caddyfile syntax support for Vim
|
|
|
|
vim-caddyfile-nvfetcher
|
2024-08-19 10:38:46 +00:00
|
|
|
|
2024-08-19 08:18:12 +00:00
|
|
|
# JSON schemas
|
|
|
|
SchemaStore-nvim
|
|
|
|
]
|
|
|
|
else
|
|
|
|
[ ]
|
|
|
|
);
|
2024-08-19 10:38:46 +00:00
|
|
|
|
2024-08-19 08:18:12 +00:00
|
|
|
extraConfig = builtins.concatStringsSep "\n" (
|
|
|
|
[
|
2021-12-02 11:19:37 +00:00
|
|
|
''
|
|
|
|
" Persistent undo
|
|
|
|
set undofile
|
|
|
|
set undodir=${xdg.cacheHome}/nvim/undo
|
2024-08-19 10:38:46 +00:00
|
|
|
|
2021-12-02 11:19:37 +00:00
|
|
|
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)
|
2024-04-22 12:27:58 +00:00
|
|
|
(builtins.readFile ./lastplace.lua)
|
2024-08-19 08:18:12 +00:00
|
|
|
]
|
|
|
|
++ (
|
|
|
|
if cfg.full then
|
|
|
|
[
|
|
|
|
(builtins.readFile ./lsp.vim)
|
|
|
|
(builtins.readFile ./cmp.vim)
|
|
|
|
]
|
|
|
|
else
|
|
|
|
[ ]
|
2024-08-19 10:38:46 +00:00
|
|
|
)
|
2024-08-19 08:18:12 +00:00
|
|
|
);
|
2021-05-30 19:10:28 +00:00
|
|
|
}
|