2022-03-11 14:03:07 +01:00
|
|
|
{ pkgs }:
|
|
|
|
|
|
|
|
let
|
|
|
|
|
2022-03-15 08:41:41 +01:00
|
|
|
# The folder contains the expected `~/.config/nvim/` structure
|
|
|
|
# This structure is the same for plugins.
|
|
|
|
# I therefore just load this folder as plugin.
|
2022-03-11 14:03:07 +01:00
|
|
|
configuration = pkgs.vimUtils.buildVimPlugin {
|
|
|
|
name = "configuration";
|
2022-03-15 08:00:46 +01:00
|
|
|
src = ./neovim/configuration;
|
2022-03-11 14:03:07 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
colorscheme-smyckblue = pkgs.vimUtils.buildVimPlugin {
|
|
|
|
name = "colorscheme-smyckblue";
|
|
|
|
src = pkgs.fetchgit {
|
|
|
|
url = "https://gitea.daniel-siepmann.de/danielsiepmann/vim-colorscheme-smyckblue.git";
|
|
|
|
rev = "v1.0.0";
|
|
|
|
sha256 = "UPh15fMTq/HHnunq+xy8YGOlqfgUaqHuTEE5kQ3j3bM=";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
neotags = pkgs.vimUtils.buildVimPlugin {
|
|
|
|
name = "neotags";
|
|
|
|
src = pkgs.fetchgit {
|
|
|
|
url = "https://gitea.daniel-siepmann.de/danielsiepmann/neotags.git";
|
|
|
|
rev = "v0.3.0";
|
|
|
|
sha256 = "uJ7cl+1Ngff0FKzjmh1i7O/PkNjPvPT+ZEHgceeZcz0=";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
# TODO: Update, compare with other forks, move to Gitea
|
|
|
|
syntax-typoscript = pkgs.vimUtils.buildVimPlugin {
|
|
|
|
name = "syntax-typoscript";
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "DanielSiepmann";
|
|
|
|
repo = "vim.typoscript";
|
|
|
|
rev = "286bc376b55b0d0d0adc6e7ccfa6a75719437120";
|
|
|
|
sha256 = "BPvKwcTo/OL9VkNJ9dv8hs4nlVkxMI6pdkZXXAKBMWs=";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
syntax-nix = pkgs.vimUtils.buildVimPlugin {
|
|
|
|
name = "syntax-nix";
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "LnL7";
|
|
|
|
repo = "vim-nix";
|
|
|
|
rev = "63b47b39c8d481ebca3092822ca8972e08df769b";
|
|
|
|
sha256 = "wQzNXfE7JFalgiCQ2ksPAUyFKacmJV7mNKmKDe9jySI=";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
syntax-php = pkgs.vimUtils.buildVimPlugin {
|
|
|
|
name = "syntax-php";
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "StanAngeloff";
|
|
|
|
repo = "php.vim";
|
|
|
|
rev = "2ec2ab9fcc65bfc47c7ba6b3846903528188ceea";
|
|
|
|
sha256 = "lgsaCU6Rzzynkd9SID0chjKaxgEWznrmEl133Syc6cY=";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
syntax-fluid = pkgs.vimUtils.buildVimPlugin {
|
|
|
|
name = "syntax-fluid";
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "mipmip";
|
|
|
|
repo = "vim-fluid";
|
|
|
|
rev = "cedc4ad871941e8f7134d1d71f9434f1bc3d93d5";
|
|
|
|
sha256 = "LiS2Dqw1K1Fu5VfHQnxIBDxDzEarmSAUUavQcwHRDsQ=";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-03-15 09:08:32 +01:00
|
|
|
syntax-mustache = pkgs.vimUtils.buildVimPlugin {
|
|
|
|
name = "syntax-mustahce";
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "mustache";
|
|
|
|
repo = "vim-mustache-handlebars";
|
|
|
|
rev = "0153fe03a919add2d6cf2d41b2d5b6e1188bc0e0";
|
|
|
|
sha256 = "lmYt+GKuXhbOhu3HufqIFE2DvzUYlk5vGqU6tpJ2yjY=";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-03-11 14:03:07 +01:00
|
|
|
ag = pkgs.vimUtils.buildVimPlugin {
|
|
|
|
name = "ag";
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "rking";
|
|
|
|
repo = "ag.vim";
|
|
|
|
rev = "c478f7973074f15bbf82c298a1678b4e23f1767a";
|
|
|
|
sha256 = "jlR8NFG7IRCYiQ7ocQQCI2npAPujgQFZ6RpFX8zwTAA=";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
vdebug = pkgs.vimUtils.buildVimPlugin {
|
|
|
|
name = "vdebug";
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "joonty";
|
|
|
|
repo = "vdebug";
|
|
|
|
rev = "v2.0.0";
|
|
|
|
sha256 = "kobMC6TRFZcEbgFdOaBgXUzoeWQUrVzUKylN1N9nEnc=";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
sqlformat = pkgs.vimUtils.buildVimPlugin {
|
|
|
|
name = "sqlformat";
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "mpyatishev";
|
|
|
|
repo = "vim-sqlformat";
|
|
|
|
rev = "2a2a57d75865526f85d94bf769f4fd54d61c426b";
|
|
|
|
sha256 = "LPnHcuh+jxEL8CZ1wizHqi3uzYYtIxzMqnE7y7mTrbE=";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
diff-fold = pkgs.vimUtils.buildVimPlugin {
|
|
|
|
name = "diff-fold";
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "sgeb";
|
|
|
|
repo = "vim-diff-fold";
|
|
|
|
rev = "48b4505c1b6f14ceb4e4be732aad337147ef36cd";
|
|
|
|
sha256 = "M3CAUueEhLD0J6sLUpRkFv+vK4aGYO+Xnokxmn+VxqU=";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
phpactor = pkgs.vimUtils.buildVimPlugin {
|
|
|
|
name = "phpactor";
|
|
|
|
src = pkgs.fetchzip {
|
|
|
|
url = "https://daniel-siepmann.de/fileadmin/phpactor-0.18.0.tar.gz";
|
|
|
|
sha256 = "1XHqKxBXcFPt2P/N2drr8EkBsg0Hu94Vjq0my+aj614=";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
neoterm = pkgs.vimUtils.buildVimPlugin {
|
|
|
|
name = "neoterm";
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "kassio";
|
|
|
|
repo = "neoterm";
|
|
|
|
rev = "e78179a9ceb98de8d0c37bdda435a5deab4d5e71";
|
|
|
|
sha256 = "0w962xfcgigdw41wblrv1l55xki0kl5vwkdbm6jlr44hzii0nhgz";
|
|
|
|
};
|
|
|
|
patches = [
|
|
|
|
./neovim/patches/disable_neoterm_repl.patch
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
tagbar = pkgs.vimUtils.buildVimPlugin {
|
|
|
|
name = "tagbar";
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "majutsushi";
|
|
|
|
repo = "tagbar";
|
|
|
|
rev = "v2.7";
|
|
|
|
sha256 = "Eg6xRwisopmBexqkWjRbSi9aQC4uCXbFO6SCK1LY+Ow=";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
in {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
extraConfig = pkgs.lib.concatMapStringsSep "\n" (file: pkgs.lib.fileContents file) [
|
|
|
|
./neovim/init.vim
|
|
|
|
|
|
|
|
./neovim/config/functions.vim
|
|
|
|
./neovim/config/indentation.vim
|
|
|
|
./neovim/config/mappings.vim
|
|
|
|
./neovim/config/searching.vim
|
|
|
|
./neovim/config/statusline.vim
|
|
|
|
./neovim/config/undo.vim
|
|
|
|
./neovim/config/wildignore.vim
|
|
|
|
|
|
|
|
./neovim/config/autocommands/basics.vim
|
|
|
|
./neovim/config/autocommands/gitdiff.vim
|
|
|
|
./neovim/config/autocommands/typo3.vim
|
|
|
|
./neovim/config/autocommands/vdebug.vim
|
|
|
|
|
|
|
|
./neovim/config/folderspecific/reuter.vim
|
2022-03-15 08:01:46 +01:00
|
|
|
./neovim/config/folderspecific/sac.vim
|
2022-03-11 14:03:07 +01:00
|
|
|
];
|
|
|
|
|
2022-03-14 10:43:26 +01:00
|
|
|
extraPython3Packages = (ps: with ps; [
|
2022-03-15 08:41:41 +01:00
|
|
|
# Dependency of sqlformat
|
2022-03-14 10:43:26 +01:00
|
|
|
sqlparse
|
|
|
|
]);
|
|
|
|
|
2022-03-14 10:43:50 +01:00
|
|
|
plugins = with pkgs.vimPlugins; [
|
2022-03-11 14:03:07 +01:00
|
|
|
|
|
|
|
# My own plugins
|
|
|
|
|
|
|
|
colorscheme-smyckblue
|
|
|
|
neotags
|
|
|
|
configuration
|
|
|
|
syntax-typoscript
|
|
|
|
|
|
|
|
# More UI related
|
|
|
|
|
|
|
|
{
|
2022-03-14 10:43:50 +01:00
|
|
|
plugin = nerdtree;
|
2022-03-11 14:03:07 +01:00
|
|
|
config = pkgs.lib.fileContents ./neovim/plugins/nerdtree.vim;
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
2022-03-14 10:43:50 +01:00
|
|
|
plugin = undotree;
|
2022-03-11 14:03:07 +01:00
|
|
|
config = pkgs.lib.fileContents ./neovim/plugins/undotree.vim;
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
# Use pinned to 2.7 as I don't need any of the new features.
|
|
|
|
# Instead they make it hard to only show what I'm interested in within PHP files.
|
|
|
|
# As they changed the building with nested structures.
|
|
|
|
plugin = tagbar;
|
|
|
|
config = pkgs.lib.fileContents ./neovim/plugins/tagbar.vim;
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
2022-03-14 10:43:50 +01:00
|
|
|
plugin = ctrlp-vim;
|
2022-03-11 14:03:07 +01:00
|
|
|
config = pkgs.lib.fileContents ./neovim/plugins/ctrlp.vim;
|
|
|
|
}
|
|
|
|
|
|
|
|
# Syntax
|
|
|
|
|
|
|
|
syntax-nix
|
2022-03-15 09:08:32 +01:00
|
|
|
syntax-mustache
|
2022-03-11 14:03:07 +01:00
|
|
|
syntax-fluid
|
|
|
|
{
|
|
|
|
plugin = syntax-php;
|
|
|
|
config = pkgs.lib.fileContents ./neovim/plugins/php.vim;
|
|
|
|
}
|
|
|
|
|
|
|
|
# Adding features
|
|
|
|
|
|
|
|
ag
|
|
|
|
sqlformat
|
|
|
|
diff-fold
|
|
|
|
|
|
|
|
{
|
2022-03-14 10:43:50 +01:00
|
|
|
plugin = vim-snipmate;
|
2022-03-15 08:41:41 +01:00
|
|
|
# I didn't migrate snippets to new format, yet.
|
2022-03-11 14:03:07 +01:00
|
|
|
config = ''
|
2022-03-14 09:46:26 +01:00
|
|
|
let g:snipMate = { 'snippet_version' : 0 }
|
2022-03-11 14:03:07 +01:00
|
|
|
'';
|
|
|
|
}
|
|
|
|
|
2022-03-14 10:43:50 +01:00
|
|
|
vim-fugitive
|
|
|
|
vim-commentary
|
|
|
|
vim-indent-object
|
|
|
|
vim-textobj-comment
|
2022-03-11 14:03:07 +01:00
|
|
|
|
|
|
|
{
|
|
|
|
plugin = vdebug;
|
|
|
|
config = pkgs.lib.fileContents ./neovim/plugins/vdebug.vim;
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
# Seems to be broken: https://github.com/kassio/neoterm/issues/338
|
|
|
|
# Therefore I install my own version where this bug is disabled
|
|
|
|
plugin = neoterm;
|
|
|
|
config = pkgs.lib.fileContents ./neovim/plugins/neoterm.vim;
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
plugin = phpactor;
|
|
|
|
config = ''
|
|
|
|
let g:phpactorOmniError = v:true
|
|
|
|
let g:phpactorPhpBin = "${pkgs.php80}/bin/php"
|
|
|
|
'';
|
|
|
|
}
|
|
|
|
|
|
|
|
# More related to testing, linting, …
|
|
|
|
|
|
|
|
{
|
2022-03-14 10:43:50 +01:00
|
|
|
plugin = ale;
|
2022-03-11 14:03:07 +01:00
|
|
|
config = pkgs.lib.fileContents ./neovim/plugins/ale.vim;
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
2022-03-14 10:43:50 +01:00
|
|
|
plugin = vim-test;
|
2022-03-11 14:03:07 +01:00
|
|
|
config = pkgs.lib.fileContents ./neovim/plugins/test.vim;
|
|
|
|
}
|
|
|
|
|
|
|
|
# Dependencies for other plugins
|
|
|
|
|
2022-03-14 10:43:50 +01:00
|
|
|
vim-addon-mw-utils
|
|
|
|
vim-textobj-user
|
2022-03-11 14:03:07 +01:00
|
|
|
];
|
|
|
|
}
|