dotfiles/nixos/home-manager/programs/vim.nix

94 lines
2.4 KiB
Nix
Raw Normal View History

2022-10-01 13:37:46 +01:00
{ config, pkgs, lib, inputs, system, ... }:
let
2022-10-31 14:06:42 +00:00
unstablePackages = inputs.nixpkgs-nixos-unstable.legacyPackages."${system}";
nil = inputs.nil.packages."${system}".default;
2022-10-31 14:06:42 +00:00
cocPackage = unstablePackages.vimPlugins.coc-nvim;
nvimPackage = unstablePackages.neovim-unwrapped;
2022-10-01 13:37:46 +01:00
in {
2022-03-08 09:56:54 +00:00
home.file.".vimrc".source = ../../../.vimrc;
home.packages = with pkgs; [ ripgrep ];
2021-11-22 19:32:26 +00:00
programs.neovim = {
enable = true;
2022-10-31 14:06:42 +00:00
package = nvimPackage;
2022-06-03 21:56:12 +01:00
coc = {
enable = true;
package = cocPackage;
2022-10-15 09:39:12 +01:00
settings = {
languageserver = {
nix = {
command = "${nil}/bin/nil";
rootPatterns = [ "flake.nix" ];
filetypes = [ "nix" ];
};
};
};
2022-10-01 13:37:46 +01:00
2022-06-03 21:56:12 +01:00
};
2021-11-22 19:32:26 +00:00
viAlias = true;
vimAlias = true;
vimdiffAlias = true;
withNodeJs = true;
withPython3 = true;
withRuby = true;
2021-09-22 13:41:05 +01:00
2022-03-08 11:53:17 +00:00
plugins = with pkgs;
with pkgs.vimPlugins; [
2022-04-22 21:02:41 +01:00
(vimUtils.buildVimPluginFrom2Nix rec {
pname = "vim-tada";
version = "2022-04-22";
src = fetchFromGitHub {
owner = "dewyze";
repo = pname;
rev = "acfda7229fc487ee6da44650164cb770d1cc608c";
sha256 = "sha256-9kvLbzrVjtBTjbXmhJ7JTggXgFvGVF7sc2YiVW9fUGY=";
};
})
2022-03-08 11:53:17 +00:00
(vimUtils.buildVimPluginFrom2Nix rec {
pname = "srht.vim";
version = "2022-01-04";
src = fetchFromSourcehut {
owner = "~willdurand";
repo = pname;
rev = "825e685f75464cbd41a5f8eded974e46f416355e";
sha256 = "sha256-9/Yeqmq/1ZIIsEgsrLLZ7o0cjOt/wlUgeLEzJoK7eco=";
};
})
ack-vim
2022-06-29 16:22:34 +01:00
coc-go
2022-06-04 08:13:41 +01:00
coc-highlight
coc-rust-analyzer
coc-yaml
2022-03-08 13:05:21 +00:00
committia-vim
2022-03-08 11:53:17 +00:00
ctrlp-vim
editorconfig-vim
fzf-vim
2022-05-28 10:31:44 +01:00
lsp-colors-nvim
2022-03-08 11:53:17 +00:00
nvim-tree-lua
nvim-web-devicons
quickfix-reflector-vim
rainbow
tabular
vim-airline
vim-airline-themes
vim-autoformat
vim-colors-solarized
vim-devicons
vim-dirdiff
vim-dispatch
vim-fugitive
vim-gitgutter
vim-markdown
vim-nix
vim-sensible
vim-startify
vim-surround
vim-toml
];
2021-11-22 19:32:26 +00:00
extraConfig = ''
if filereadable($HOME . "/.vimrc")
2022-10-15 09:39:12 +01:00
source $HOME/.vimrc
2021-11-22 19:32:26 +00:00
endif
'';
};
}