spacevim: update and add general improvements
This commit is contained in:
parent
87fc1dd618
commit
507333f484
@ -1,18 +0,0 @@
|
||||
diff --git a/autoload/SpaceVim.vim b/autoload/SpaceVim.vim
|
||||
index 16688680..fcafd6f7 100644
|
||||
--- a/autoload/SpaceVim.vim
|
||||
+++ b/autoload/SpaceVim.vim
|
||||
@@ -1355,13 +1355,6 @@ function! SpaceVim#end() abort
|
||||
let &helplang = 'jp'
|
||||
endif
|
||||
""
|
||||
- " generate tags for SpaceVim
|
||||
- let help = fnamemodify(g:_spacevim_root_dir, ':p:h') . '/doc'
|
||||
- try
|
||||
- exe 'helptags ' . help
|
||||
- catch
|
||||
- call SpaceVim#logger#warn('Failed to generate helptags for SpaceVim')
|
||||
- endtry
|
||||
|
||||
""
|
||||
" set language
|
@ -1,26 +1,21 @@
|
||||
{ ripgrep
|
||||
, git
|
||||
, fzf
|
||||
, makeWrapper
|
||||
, vim-full
|
||||
, vimPlugins
|
||||
, fetchFromGitHub
|
||||
, lib
|
||||
, stdenv
|
||||
, formats
|
||||
, runCommand
|
||||
, spacevim_config ? import ./init.nix
|
||||
{
|
||||
fetchFromGitHub,
|
||||
formats,
|
||||
fzf,
|
||||
git,
|
||||
lib,
|
||||
makeWrapper,
|
||||
neovim,
|
||||
nix-update-script,
|
||||
ripgrep,
|
||||
runCommand,
|
||||
stdenv,
|
||||
vim-full,
|
||||
spacevim_config ? import ./init.nix,
|
||||
}:
|
||||
|
||||
let
|
||||
format = formats.toml { };
|
||||
vim-customized = vim-full.customize {
|
||||
name = "vim";
|
||||
# Not clear at the moment how to import plugins such that
|
||||
# SpaceVim finds them and does not auto download them to
|
||||
# ~/.cache/vimfiles/repos
|
||||
vimrcConfig.packages.myVimPackage = with vimPlugins; { start = [ ]; };
|
||||
};
|
||||
spacevimdir = runCommand "SpaceVim.d" { } ''
|
||||
mkdir -p $out
|
||||
cp ${format.generate "init.toml" spacevim_config} $out/init.toml
|
||||
@ -28,28 +23,16 @@ let
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "spacevim";
|
||||
version = "1.8.0";
|
||||
version = "2.3.0";
|
||||
src = fetchFromGitHub {
|
||||
owner = "SpaceVim";
|
||||
repo = "SpaceVim";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256:11snnh5q47nqhzjb9qya6hpnmlzc060958whqvqrh4hc7gnlnqp8";
|
||||
hash = "sha256-MHsAA0x/rfwRupe8aW1JVKGiYkySAX0AhOkBuScpn7I=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper vim-customized ];
|
||||
buildInputs = [ vim-customized ];
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
# generate the helptags
|
||||
vim -u NONE -c "helptags $(pwd)/doc" -c q
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
patches = [
|
||||
# Don't generate helptags at runtime into read-only $SPACEVIMDIR
|
||||
./helptags.patch
|
||||
];
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
@ -58,21 +41,42 @@ stdenv.mkDerivation rec {
|
||||
cp -r $(pwd) $out/SpaceVim
|
||||
|
||||
# trailing slash very important for SPACEVIMDIR
|
||||
makeWrapper "${vim-customized}/bin/vim" "$out/bin/spacevim" \
|
||||
makeWrapper "${vim-full}/bin/vim" "$out/bin/spacevim" \
|
||||
--add-flags "-u $out/SpaceVim/vimrc" --set SPACEVIMDIR "${spacevimdir}/" \
|
||||
--prefix PATH : ${lib.makeBinPath [ fzf git ripgrep]}
|
||||
--prefix PATH : ${
|
||||
lib.makeBinPath [
|
||||
fzf
|
||||
git
|
||||
ripgrep
|
||||
]
|
||||
}
|
||||
makeWrapper "${neovim}/bin/nvim" "$out/bin/spacenvim" \
|
||||
--add-flags "-u $out/SpaceVim/init.vim" --set SPACEVIMDIR "${spacevimdir}/" \
|
||||
--prefix PATH : ${
|
||||
lib.makeBinPath [
|
||||
fzf
|
||||
git
|
||||
ripgrep
|
||||
]
|
||||
}
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Modern Vim distribution";
|
||||
passthru.updateScript = nix-update-script { };
|
||||
|
||||
meta = {
|
||||
description = "Modular Vim/Neovim configuration";
|
||||
longDescription = ''
|
||||
SpaceVim is a distribution of the Vim editor that’s inspired by spacemacs.
|
||||
SpaceVim is a modular configuration of Vim and Neovim. It's inspired by
|
||||
spacemacs. It manages collections of plugins in layers, which help to
|
||||
collect related packages together to provide features. This approach
|
||||
helps keep the configuration organized and reduces overhead for the user
|
||||
by keeping them from having to think about what packages to install.
|
||||
'';
|
||||
homepage = "https://spacevim.org/";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = [ maintainers.fzakaria ];
|
||||
platforms = platforms.all;
|
||||
license = lib.licenses.gpl3Plus;
|
||||
maintainers = [ lib.maintainers.fzakaria ];
|
||||
platforms = lib.platforms.all;
|
||||
mainProgram = "spacevim";
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user