1
0
Fork 0
dotfiles/programs/nvim/default.nix

154 lines
3.3 KiB
Nix
Raw Normal View History

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-27 20:24:11 +00:00
nvim-spell-de-utf8-dictionary = builtins.fetchurl {
url = "http://ftp.vim.org/pub/vim/runtime/spell/de.utf-8.spl";
sha256 = "73c7107ea339856cdbe921deb92a45939c4de6eb9c07261da1b9dd19f683a3d1";
};
nvim-spell-de-utf8-suggestions = builtins.fetchurl {
url = "http://ftp.vim.org/pub/vim/runtime/spell/de.utf-8.sug";
sha256 = "13d0ecf92863d89ef60cd4a8a5eb2a5a13a0e8f9ba8d1c6abe47aba85714a948";
};
2021-12-06 22:35:29 +00:00
in
{
programs.neovim = {
enable = true;
package = pkgs.neovim-nightly;
withNodeJs = false;
withRuby = false;
withPython3 = false;
2021-12-06 22:35:29 +00:00
extraConfig = ''
" 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
lua require('impatient')
2021-12-06 22:35:29 +00:00
lua require('nix_init')
'';
extraPackages = with pkgs; [
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
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
];
plugins = with customPlugins; [
# Fixes
impatient-nvim
2021-12-06 22:35:29 +00:00
FixCursorHold-nvim
# 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-02-14 14:22:40 +00:00
lightspeed-nvim
2021-12-06 22:35:29 +00:00
# Themes
dracula-nvim
# Syntax
nvim-treesitter
2021-12-06 22:35:29 +00:00
playground
Jenkinsfile-vim-syntax
# Telescope
telescope-nvim
2022-02-13 20:58:18 +00:00
telescope-zf-native-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
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
2022-02-14 14:22:40 +00:00
vim-surround
2021-12-06 22:35:29 +00:00
# UI
undotree
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
neogit
2021-12-06 22:35:29 +00:00
gitsigns-nvim
spellsitter-nvim
nvim-notify
nvim-visual-eof-lua
FTerm-nvim
editorconfig-vim
];
};
xdg.configFile.nvim = {
source = ../../config/nvim;
recursive = true;
};
2021-12-27 20:24:11 +00:00
2021-12-30 21:36:35 +00:00
home.file."${nvim-spell-directory}/de.utf-8.spl".source = nvim-spell-de-utf8-dictionary;
home.file."${nvim-spell-directory}/de.utf-8.sug".source = nvim-spell-de-utf8-suggestions;
2021-12-06 22:35:29 +00:00
}