81 lines
1.9 KiB
Nix
81 lines
1.9 KiB
Nix
{ config, pkgs, ... }:
|
|
|
|
let
|
|
neovim-unwrapped = pkgs.neovim-unwrapped.overrideAttrs (oldAttrs: rec {
|
|
version = "2021-03-04";
|
|
src = pkgs.fetchFromGitHub {
|
|
owner = "neovim";
|
|
repo = "neovim";
|
|
rev = "df4440024bb1f1ce368f5e5844d8af925e264b63";
|
|
sha256 = "12mm9js8pry2hzv0znznqwkn1favzxclygwr24lhzdwfc7wd7p92";
|
|
};
|
|
nativeBuildInputs = oldAttrs.nativeBuildInputs
|
|
++ [ pkgs.utf8proc pkgs.tree-sitter ];
|
|
});
|
|
|
|
buildVimPluginFrom2Nix = pkgs.vimUtils.buildVimPluginFrom2Nix;
|
|
|
|
vimLua = lua: ''
|
|
lua << EOF
|
|
${lua}
|
|
EOF
|
|
'';
|
|
in {
|
|
home.packages = with pkgs; [
|
|
gcc # required for nvim-treesitter
|
|
graphviz
|
|
];
|
|
|
|
programs.neovim = {
|
|
enable = true;
|
|
package = neovim-unwrapped;
|
|
viAlias = true;
|
|
vimAlias = true;
|
|
plugins = with pkgs.vimPlugins; [
|
|
gruvbox
|
|
editorconfig-vim
|
|
direnv-vim
|
|
fzf-vim
|
|
lightline-vim
|
|
nerdtree
|
|
vim-startify
|
|
vim-visual-multi
|
|
vim-surround
|
|
vim-commentary
|
|
vim-easymotion
|
|
vim-which-key
|
|
vim-peekaboo
|
|
vim-gitgutter
|
|
vim-fugitive
|
|
vim-test
|
|
vim-closetag
|
|
auto-pairs
|
|
camelcasemotion
|
|
wmgraphviz-vim
|
|
|
|
# use :TSInstall & :TSUpdate to manage parsers
|
|
nvim-treesitter
|
|
nvim-treesitter-context
|
|
nvim-treesitter-refactor
|
|
nvim-treesitter-textobjects
|
|
|
|
nvim-lspconfig
|
|
# nvim-dap
|
|
|
|
completion-nvim
|
|
|
|
vim-orgmode
|
|
];
|
|
extraConfig = with builtins;
|
|
readFile ./init.vim # + readFile ./vim-surround-fix.vim
|
|
+ readFile ./which-key.vim + readFile ./test.vim
|
|
+ vimLua (readFile ./lsp/extensions.lua) + readFile ./lsp/lsp.vim
|
|
+ vimLua (readFile ./lsp/lsp.lua) + vimLua (readFile ./treesitter.lua);
|
|
withNodeJs = true;
|
|
withPython = false;
|
|
};
|
|
|
|
xdg.configFile."nvim/filetype.vim".source = ./filetype.vim;
|
|
xdg.configFile."nvim/scripts.vim".source = ./scripts.vim;
|
|
}
|