nixos-config/home/editors/neovim.nix

109 lines
2.5 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
buildVimPluginFrom2Nix = pkgs.vimUtils.buildVimPluginFrom2Nix;
omnisharp-vim = buildVimPluginFrom2Nix {
pname = "omnisharp-vim";
version = "master";
src = pkgs.fetchFromGitHub {
owner = "FelschR";
repo = "omnisharp-vim";
2020-03-04 19:03:53 +01:00
rev = "3eb38ffbf6295d24e544b72fb349e876cd28ad96";
sha256 = "0wvhjv7rdscm0kps72wlbyhqk99j6c6flqsd2vkj0v985l48nzhz";
2019-12-12 15:42:12 +01:00
};
};
nvim-lsp = buildVimPluginFrom2Nix {
pname = "nvim-lsp";
version = "2020-03-17";
2019-12-12 15:42:12 +01:00
src = pkgs.fetchFromGitHub {
owner = "neovim";
repo = "nvim-lsp";
2020-03-17 22:56:43 +01:00
rev = "913579facce05f0069b9378c046150f635aba1b1";
sha256 = "1rjp36shl9vpi5k4vd4n2np2gmkyx65hcljcwk1403cwy6b63mwa";
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
nixpkgs.overlays = [
(self: super: {
neovim-unwrapped = super.neovim-unwrapped.overrideAttrs (oldAttrs: rec {
version = "master-lsp";
src = pkgs.fetchFromGitHub {
owner = "neovim";
repo = "neovim";
2020-03-17 22:56:43 +01:00
rev = "5a5c2f0290b5cdb8ccc1a06cb41f248ab25fd792";
sha256 = "03hg6870vlh3q1flyhnijnnm8b8441cnh0j1g5jlxdf46sx5fn7c";
2019-12-12 15:42:12 +01:00
};
nativeBuildInputs = oldAttrs.nativeBuildInputs ++ [
pkgs.utf8proc
];
});
})
];
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;
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
}