nixos-config/home/editors/neovim.nix

106 lines
2.4 KiB
Nix
Raw Normal View History

2019-10-19 12:55:35 +02:00
{ config, pkgs, ... }:
2019-12-12 15:42:12 +01:00
let
neovim-unwrapped = pkgs.neovim-unwrapped.overrideAttrs (oldAttrs: rec {
version = "2020-05-21";
src = pkgs.fetchFromGitHub {
owner = "neovim";
repo = "neovim";
rev = "044eb56ed2f44b545e7488990ecf195a930174aa";
sha256 = "1k1wl9i0177h4gn1zind6j52vks68fzii0lncj4rk7vsk2ygwb4l";
};
nativeBuildInputs = oldAttrs.nativeBuildInputs ++ [
pkgs.utf8proc
];
});
2019-12-12 15:42:12 +01:00
buildVimPluginFrom2Nix = pkgs.vimUtils.buildVimPluginFrom2Nix;
omnisharp-vim = buildVimPluginFrom2Nix {
pname = "omnisharp-vim";
version = "2020-05-19";
2019-12-12 15:42:12 +01:00
src = pkgs.fetchFromGitHub {
owner = "FelschR";
repo = "omnisharp-vim";
rev = "dbdc28cfa1a85d154cedeb6f8262174b16d21efc";
sha256 = "0mg51bpmzpcd7fgsqfsslywvld2iskhki08ladq57366rd4s5pnx";
2019-12-12 15:42:12 +01:00
};
};
nvim-lsp = buildVimPluginFrom2Nix {
pname = "nvim-lsp";
version = "2020-05-21";
2019-12-12 15:42:12 +01:00
src = pkgs.fetchFromGitHub {
owner = "neovim";
repo = "nvim-lsp";
rev = "77d32660c4968b23b3897c4d0fa62d86f0b37810";
sha256 = "01mwh6myldp5sbichz6h0kr8b2cycp2g7djka099bfh9qnr53hjk";
2019-12-12 15:42:12 +01:00
};
};
in
2019-10-19 12:55:35 +02:00
{
2019-12-12 15:42:12 +01:00
home.packages = with pkgs; [
2020-03-21 16:53:05 +01:00
# nodejs-12_x
2019-12-12 15:42:12 +01:00
# haskellPackages.ghcide
];
2019-10-19 12:55:35 +02:00
programs.neovim = {
enable = true;
package = neovim-unwrapped;
2019-10-19 12:55:35 +02:00
viAlias = true;
vimAlias = true;
plugins = with pkgs.vimPlugins; [
2019-12-12 15:42:12 +01:00
gruvbox
editorconfig-vim
2020-03-18 11:26:16 +01:00
direnv-vim
2019-12-12 15:42:12 +01:00
fzf-vim
lightline-vim
nerdtree
2020-01-23 13:18:11 +01:00
vim-startify
2019-12-12 15:42:12 +01:00
vim-polyglot
vim-multiple-cursors
vim-surround
vim-commentary
vim-easymotion
2020-03-04 19:03:00 +01:00
vim-peekaboo
2019-12-17 18:22:42 +01:00
vim-gitgutter
2020-01-23 13:18:11 +01:00
vim-fugitive
2020-03-04 19:03:00 +01:00
vim-test
2019-12-12 15:42:12 +01:00
camelcasemotion
2020-03-04 19:03:00 +01:00
argtextobj-vim
2019-12-12 15:42:12 +01:00
nvim-lsp
deoplete-nvim
deoplete-lsp
2019-12-12 15:42:12 +01:00
vim-orgmode
2019-10-19 12:55:35 +02:00
vim-nix
2019-12-12 15:42:12 +01:00
coc-nvim
2020-03-17 22:56:43 +01:00
coc-tabnine
coc-pairs
coc-emmet
coc-snippets
coc-highlight
coc-html
coc-css
coc-tsserver
coc-json
coc-yaml
coc-eslint
coc-stylelint
coc-prettier
# not yet in nixpkgs:
2020-03-04 19:03:00 +01:00
# coc-angular
2020-03-17 22:56:43 +01:00
# coc-omnisharp # not really maintained
2019-12-12 15:42:12 +01:00
2020-01-23 15:09:31 +01:00
ale # only used for omnisharp-vim
2019-12-12 15:42:12 +01:00
omnisharp-vim
2019-10-19 12:55:35 +02:00
];
2020-01-23 13:18:11 +01:00
extraConfig = with builtins; readFile ./init.vim + readFile ./coc.vim;
# extraConfig = with builtins; readFile ./init.vim + readFile ./lsp.vim;
2020-02-13 18:52:52 +01:00
withNodeJs = true;
2019-10-19 12:55:35 +02:00
};
2020-03-13 20:06:35 +01:00
xdg.configFile."nvim/coc-settings.json".source = ./coc-settings.json;
2019-10-19 12:55:35 +02:00
}