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

166 lines
3.6 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 = ''
lua require('impatient')
2021-12-06 22:35:29 +00:00
lua require('nix_init')
'';
extraPackages = with pkgs; [
2021-12-14 19:32:50 +00:00
nodejs-16_x
2021-12-06 22:35:29 +00:00
tree-sitter
# 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
vim-auto-cursorline
# 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; }
2021-12-06 22:35:29 +00:00
# Themes
dracula-nvim
# Syntax
(pkgs.vimPlugins.nvim-treesitter.withPlugins (
plugins: with plugins; [
tree-sitter-bash
tree-sitter-comment
tree-sitter-css
tree-sitter-dockerfile
tree-sitter-elixir
tree-sitter-erlang
tree-sitter-fish
tree-sitter-java
tree-sitter-javascript
tree-sitter-json
tree-sitter-make
tree-sitter-nix
tree-sitter-query
tree-sitter-regex
tree-sitter-ruby
tree-sitter-svelte
tree-sitter-toml
tree-sitter-typescript
tree-sitter-vim
tree-sitter-yaml
]
))
2021-12-06 22:35:29 +00:00
playground
Jenkinsfile-vim-syntax
# Telescope
telescope-nvim
telescope-fzf-native-nvim
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
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
surround-nvim
# 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
nvim-colorizer-lua
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
}