nix/neovim: switch to using nixvim and partially migrate
This commit is contained in:
parent
0e1ddd4fd3
commit
70401e484a
1 changed files with 143 additions and 107 deletions
|
@ -1,131 +1,167 @@
|
|||
{
|
||||
repoFlake,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
in {
|
||||
# FIXME: this doesn't work
|
||||
home.sessionVariables.EDITOR = "nvim";
|
||||
}: {
|
||||
imports = [
|
||||
repoFlake.inputs.nixvim.homeManagerModules.nixvim
|
||||
];
|
||||
|
||||
programs.neovim = {
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
vimdiffAlias = true;
|
||||
vimAlias = true;
|
||||
|
||||
extraPython3Packages = ps: with ps; [];
|
||||
|
||||
extraConfig = builtins.readFile ./neovim/vimrc;
|
||||
# extraConfigVim = builtins.readFile ./neovim/vimrc;
|
||||
|
||||
plugins = with pkgs;
|
||||
[
|
||||
# yaml-folds
|
||||
{
|
||||
plugin = vimUtils.buildVimPlugin {
|
||||
name = "vim-yaml-folds";
|
||||
src = fetchFromGitHub {
|
||||
owner = "pedrohdz";
|
||||
repo = "vim-yaml-folds";
|
||||
rev = "890ccd8e5370808d569e96dbb06cbeca2cf5993a";
|
||||
sha256 = "018z6xcwrq58q6lj6gwhrifjaxkmrlkkg0n86s6mjjlwkbs2qa4m";
|
||||
clipboard = {
|
||||
register = "unnamedplus";
|
||||
providers.wl-copy.enable = true;
|
||||
};
|
||||
buildInputs = [zip vim];
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
plugin = vimUtils.buildVimPlugin {
|
||||
name = "vim-yaml";
|
||||
src = fetchFromGitHub {
|
||||
owner = "stephpy";
|
||||
repo = "vim-yaml";
|
||||
rev = "e97e063b16eba4e593d620676a0a15fa98613979";
|
||||
sha256 = "0vqahbrnr43lxanpziyrmzaqqb3cmyny8ry1xvmy2xyd1larzfrk";
|
||||
plugins = {
|
||||
airline = {
|
||||
enable = true;
|
||||
settings = {
|
||||
powerline_fonts = true;
|
||||
skip_empty_sections = true;
|
||||
theme = "papercolor";
|
||||
};
|
||||
};
|
||||
}
|
||||
fugitive.enable = true;
|
||||
gitblame.enable = true;
|
||||
lsp = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
# broken 2021-06-08
|
||||
nix.enable = true;
|
||||
|
||||
# TODO: enable in next release
|
||||
# numbertoggle.enable = true;
|
||||
|
||||
# successfor to ctrlp and fzf
|
||||
telescope.enable = true;
|
||||
|
||||
todo-comments.enable = true;
|
||||
|
||||
toggleterm.enable = true;
|
||||
|
||||
treesitter = {
|
||||
enable = true;
|
||||
|
||||
grammarPackages = with pkgs.vimPlugins.nvim-treesitter.builtGrammars; [
|
||||
bash
|
||||
json
|
||||
lua
|
||||
make
|
||||
markdown
|
||||
nix
|
||||
regex
|
||||
toml
|
||||
vim
|
||||
vimdoc
|
||||
xml
|
||||
yaml
|
||||
];
|
||||
};
|
||||
|
||||
treesitter-context.enable = true;
|
||||
treesitter-refactor.enable = true;
|
||||
|
||||
# This plugin trims trailing whitespace and lines.
|
||||
trim.enable = true;
|
||||
};
|
||||
|
||||
# plugins = with pkgs;
|
||||
# [
|
||||
# # yaml-folds
|
||||
# {
|
||||
# plugin = vimUtils.buildVimPlugin {
|
||||
# name = "vim-markdown-toc";
|
||||
# name = "vim-yaml-folds";
|
||||
# src = fetchFromGitHub {
|
||||
# owner = "mzlogin";
|
||||
# repo = "vim-markdown-toc";
|
||||
# rev = "b7bb6c37033d3a6c93906af48dc0e689bd948638";
|
||||
# sha256 = "026xf2gid4qivwawh7if3nfk7zja9di0flhdzdx82lvil9x48lyz";
|
||||
# owner = "pedrohdz";
|
||||
# repo = "vim-yaml-folds";
|
||||
# rev = "890ccd8e5370808d569e96dbb06cbeca2cf5993a";
|
||||
# sha256 = "018z6xcwrq58q6lj6gwhrifjaxkmrlkkg0n86s6mjjlwkbs2qa4m";
|
||||
# };
|
||||
# buildInputs = [zip vim];
|
||||
# };
|
||||
# }
|
||||
|
||||
# {
|
||||
# plugin = vimUtils.buildVimPlugin {
|
||||
# name = "vim-yaml";
|
||||
# src = fetchFromGitHub {
|
||||
# owner = "stephpy";
|
||||
# repo = "vim-yaml";
|
||||
# rev = "e97e063b16eba4e593d620676a0a15fa98613979";
|
||||
# sha256 = "0vqahbrnr43lxanpziyrmzaqqb3cmyny8ry1xvmy2xyd1larzfrk";
|
||||
# };
|
||||
# };
|
||||
# }
|
||||
|
||||
# broken 2021-06-08
|
||||
# {
|
||||
# plugin = vimUtils.buildVimPlugin {
|
||||
# name = "vim-perl";
|
||||
# name = "git-blame";
|
||||
# src = fetchFromGitHub {
|
||||
# owner = "vim-perl";
|
||||
# repo = "vim-perl";
|
||||
# rev = "f330b5d474c44e6cfae22ba50868093dea3e9adb";
|
||||
# sha256 = "1dy40ixgixj0536c5ggra51b4yd1lbw4j6l0j5zc3diasb7m2gvr";
|
||||
# "owner" = "zivyangll";
|
||||
# "repo" = "git-blame.vim";
|
||||
# "rev" = "9d144b7bed5d8f1c9259551768b7f3b3d1294917";
|
||||
# "sha256" = "06zb5xcc59k25rpwl46j82fcqckiznmj97v6i0mwlb8jhqqrhy9j";
|
||||
# };
|
||||
# };
|
||||
# }
|
||||
# ]
|
||||
# ++ (with pkgs.vimPlugins; [
|
||||
# delimitMate
|
||||
# vim-airline
|
||||
# vim-airline-themes
|
||||
# ctrlp
|
||||
# vim-css-color
|
||||
# rainbow_parentheses
|
||||
# vim-colorschemes
|
||||
# vim-colorstepper
|
||||
# vim-signify
|
||||
# fugitive
|
||||
# vim-indent-guides
|
||||
# UltiSnips
|
||||
# fzfWrapper
|
||||
|
||||
{
|
||||
plugin = vimUtils.buildVimPlugin {
|
||||
name = "git-blame";
|
||||
src = fetchFromGitHub {
|
||||
"owner" = "zivyangll";
|
||||
"repo" = "git-blame.vim";
|
||||
"rev" = "9d144b7bed5d8f1c9259551768b7f3b3d1294917";
|
||||
"sha256" = "06zb5xcc59k25rpwl46j82fcqckiznmj97v6i0mwlb8jhqqrhy9j";
|
||||
};
|
||||
};
|
||||
}
|
||||
]
|
||||
++ (with pkgs.vimPlugins; [
|
||||
delimitMate
|
||||
vim-airline
|
||||
vim-airline-themes
|
||||
ctrlp
|
||||
vim-css-color
|
||||
rainbow_parentheses
|
||||
vim-colorschemes
|
||||
vim-colorstepper
|
||||
vim-signify
|
||||
fugitive
|
||||
vim-indent-guides
|
||||
UltiSnips
|
||||
fzfWrapper
|
||||
|
||||
ncm2
|
||||
ncm2-bufword
|
||||
ncm2-path
|
||||
ncm2-tmux
|
||||
ncm2-ultisnips
|
||||
nvim-yarp
|
||||
|
||||
LanguageClient-neovim
|
||||
|
||||
Improved-AnsiEsc
|
||||
tabular
|
||||
|
||||
# Nix
|
||||
vim-addon-nix
|
||||
tlib
|
||||
vim-addon-vim2nix
|
||||
|
||||
# LaTeX
|
||||
vim-latex-live-preview
|
||||
vimtex
|
||||
|
||||
# YAML
|
||||
vim-yaml
|
||||
|
||||
# markdown
|
||||
vim-markdown
|
||||
vim-markdown-toc
|
||||
|
||||
# misc syntax support
|
||||
vim-bazel
|
||||
maktaba
|
||||
]);
|
||||
# ncm2
|
||||
# ncm2-bufword
|
||||
# ncm2-path
|
||||
# ncm2-tmux
|
||||
# ncm2-ultisnips
|
||||
# nvim-yarp
|
||||
|
||||
# LanguageClient-neovim
|
||||
|
||||
# Improved-AnsiEsc
|
||||
# tabular
|
||||
|
||||
# # Nix
|
||||
# vim-addon-nix
|
||||
# tlib
|
||||
# vim-addon-vim2nix
|
||||
|
||||
# # LaTeX
|
||||
# vim-latex-live-preview
|
||||
# vimtex
|
||||
|
||||
# # YAML
|
||||
# vim-yaml
|
||||
|
||||
# # markdown
|
||||
# vim-markdown
|
||||
# vim-markdown-toc
|
||||
|
||||
# # misc syntax support
|
||||
# vim-bazel
|
||||
# maktaba
|
||||
# ]);
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue