2021-12-27 20:24:11 +00:00
|
|
|
{ config, pkgs, ... }:
|
2021-12-06 22:35:29 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
customPlugins = import ./plugins.nix { inherit pkgs; };
|
2021-12-27 20:24:11 +00:00
|
|
|
|
2021-12-30 21:36:35 +00:00
|
|
|
nvim-spell-directory = "${config.xdg.configHome}/nvim/spell";
|
2021-12-06 22:35:29 +00:00
|
|
|
in
|
|
|
|
{
|
|
|
|
programs.neovim = {
|
|
|
|
enable = true;
|
|
|
|
package = pkgs.neovim-nightly;
|
|
|
|
|
2021-12-07 15:23:17 +00:00
|
|
|
withNodeJs = false;
|
|
|
|
withRuby = false;
|
|
|
|
withPython3 = false;
|
|
|
|
|
2021-12-06 22:35:29 +00:00
|
|
|
extraConfig = ''
|
2022-01-24 00:25:13 +00:00
|
|
|
" Move these paths to the end of $PATH to prevent triggering the XCode CLI popup
|
2022-02-15 22:52:36 +00:00
|
|
|
let xcode_paths = [':/usr/local/bin:', ':/usr/bin:', ':/usr/sbin:', ':/bin:', ':/sbin:']
|
|
|
|
for xcode_path in xcode_paths
|
|
|
|
let $PATH = substitute($PATH, xcode_path, ":", "") . substitute(xcode_path, ":$", "", "")
|
|
|
|
endfor
|
2022-01-24 00:25:13 +00:00
|
|
|
|
2022-03-12 19:46:27 +00:00
|
|
|
lua << EOF
|
|
|
|
require('impatient')
|
|
|
|
require('nix_init')
|
|
|
|
EOF
|
2021-12-06 22:35:29 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
extraPackages = with pkgs; [
|
2022-01-24 00:25:13 +00:00
|
|
|
gcc
|
|
|
|
gnumake
|
2022-02-03 22:35:52 +00:00
|
|
|
git
|
2021-12-14 19:32:50 +00:00
|
|
|
nodejs-16_x
|
2021-12-06 22:35:29 +00:00
|
|
|
tree-sitter
|
2022-02-12 22:13:58 +00:00
|
|
|
ripgrep
|
2021-12-06 22:35:29 +00:00
|
|
|
|
|
|
|
# LSP
|
|
|
|
nodePackages.bash-language-server
|
|
|
|
nodePackages.dockerfile-language-server-nodejs
|
2021-12-20 17:43:23 +00:00
|
|
|
nodePackages.typescript-language-server
|
2021-12-06 22:35:29 +00:00
|
|
|
nodePackages.vscode-langservers-extracted
|
|
|
|
nodePackages.yaml-language-server
|
|
|
|
rnix-lsp
|
|
|
|
sqls
|
2021-12-27 23:52:34 +00:00
|
|
|
sumneko-lua-language-server
|
2021-12-06 22:35:29 +00:00
|
|
|
taplo-lsp
|
|
|
|
|
|
|
|
# LSP Tools
|
|
|
|
hadolint
|
|
|
|
shellcheck
|
|
|
|
shfmt
|
2021-12-18 23:25:21 +00:00
|
|
|
statix
|
2021-12-06 22:35:29 +00:00
|
|
|
];
|
|
|
|
|
2022-04-01 23:17:03 +00:00
|
|
|
plugins = (with customPlugins; [
|
2021-12-06 22:35:29 +00:00
|
|
|
# Fixes
|
2021-12-16 20:13:07 +00:00
|
|
|
impatient-nvim
|
2021-12-06 22:35:29 +00:00
|
|
|
|
|
|
|
# Utils
|
|
|
|
popup-nvim
|
|
|
|
plenary-nvim
|
|
|
|
nvim-web-devicons
|
|
|
|
|
|
|
|
# Keybindings
|
|
|
|
which-key-nvim
|
2021-12-07 20:59:18 +00:00
|
|
|
{ plugin = vim-yoink; optional = true; }
|
|
|
|
{ plugin = vim-cutlass; optional = true; }
|
2021-12-07 22:01:39 +00:00
|
|
|
{ plugin = vim-subversive; optional = true; }
|
2022-04-01 08:12:30 +00:00
|
|
|
leap-nvim
|
2021-12-06 22:35:29 +00:00
|
|
|
|
|
|
|
# Themes
|
|
|
|
dracula-nvim
|
|
|
|
|
|
|
|
# Syntax
|
2022-01-24 00:25:13 +00:00
|
|
|
nvim-treesitter
|
2021-12-06 22:35:29 +00:00
|
|
|
playground
|
|
|
|
|
|
|
|
# Telescope
|
|
|
|
telescope-nvim
|
2022-02-13 20:58:18 +00:00
|
|
|
telescope-zf-native-nvim
|
2022-03-17 09:33:08 +00:00
|
|
|
telescope-ui-select-nvim
|
2021-12-06 22:35:29 +00:00
|
|
|
project-nvim
|
|
|
|
todo-comments-nvim
|
|
|
|
|
|
|
|
# LSP
|
|
|
|
nvim-lspconfig
|
2021-12-18 22:05:38 +00:00
|
|
|
null-ls-nvim
|
2021-12-15 19:43:52 +00:00
|
|
|
trouble-nvim
|
2021-12-06 22:35:29 +00:00
|
|
|
lspkind-nvim
|
2022-03-02 22:31:21 +00:00
|
|
|
virtual-types-nvim
|
2021-12-06 22:35:29 +00:00
|
|
|
lsp-status-nvim
|
|
|
|
vim-illuminate
|
|
|
|
|
|
|
|
# cmp
|
|
|
|
nvim-cmp
|
|
|
|
cmp-nvim-lsp
|
2021-12-19 20:32:20 +00:00
|
|
|
cmp-nvim-lsp-signature-help
|
2021-12-06 22:35:29 +00:00
|
|
|
LuaSnip
|
|
|
|
cmp_luasnip
|
|
|
|
cmp-nvim-lua
|
|
|
|
cmp-path
|
|
|
|
cmp-buffer
|
|
|
|
cmp-treesitter
|
|
|
|
cmp-cmdline
|
|
|
|
cmp-nvim-lsp-document-symbol
|
|
|
|
|
|
|
|
# Pairs
|
|
|
|
nvim-autopairs
|
|
|
|
nvim-ts-autotag
|
|
|
|
vim-matchup
|
|
|
|
|
|
|
|
# Comments
|
|
|
|
Comment-nvim
|
|
|
|
|
|
|
|
# Textobjects
|
|
|
|
nvim-treesitter-textobjects
|
|
|
|
|
|
|
|
# UI
|
|
|
|
lualine-nvim
|
2021-12-15 19:43:52 +00:00
|
|
|
bufferline-nvim
|
2021-12-06 22:35:29 +00:00
|
|
|
nvim-tree-lua
|
|
|
|
indent-blankline-nvim
|
|
|
|
virt-column-nvim
|
2022-03-02 22:31:21 +00:00
|
|
|
neogit
|
2021-12-06 22:35:29 +00:00
|
|
|
gitsigns-nvim
|
|
|
|
spellsitter-nvim
|
|
|
|
nvim-notify
|
|
|
|
nvim-visual-eof-lua
|
|
|
|
FTerm-nvim
|
2022-04-01 23:17:03 +00:00
|
|
|
]) ++ (with pkgs.vimPlugins; [
|
|
|
|
# Fixes
|
|
|
|
FixCursorHold-nvim
|
|
|
|
|
|
|
|
# Textobjects
|
|
|
|
vim-surround
|
|
|
|
|
|
|
|
# UI
|
|
|
|
undotree
|
|
|
|
]);
|
2021-12-06 22:35:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
xdg.configFile.nvim = {
|
|
|
|
source = ../../config/nvim;
|
|
|
|
recursive = true;
|
|
|
|
};
|
2021-12-27 20:24:11 +00:00
|
|
|
|
2022-04-01 23:17:03 +00:00
|
|
|
home.file."${nvim-spell-directory}/de.utf-8.spl".source = builtins.fetchurl {
|
|
|
|
url = "http://ftp.vim.org/pub/vim/runtime/spell/de.utf-8.spl";
|
|
|
|
sha256 = "73c7107ea339856cdbe921deb92a45939c4de6eb9c07261da1b9dd19f683a3d1";
|
|
|
|
};
|
|
|
|
|
|
|
|
home.file."${nvim-spell-directory}/de.utf-8.sug".source = builtins.fetchurl {
|
|
|
|
url = "http://ftp.vim.org/pub/vim/runtime/spell/de.utf-8.sug";
|
|
|
|
sha256 = "13d0ecf92863d89ef60cd4a8a5eb2a5a13a0e8f9ba8d1c6abe47aba85714a948";
|
|
|
|
};
|
2022-04-01 08:12:30 +00:00
|
|
|
|
|
|
|
home.sessionVariables.EDITOR = "nvim";
|
2021-12-06 22:35:29 +00:00
|
|
|
}
|