spacevim: init at v1.5.0

Spacevim is a fully loaded vim/neovim installation in the spirit
of https://www.spacemacs.org/

It's configured with a TOML file rather than vimscript and includes
a wide array of configuration found at https://spacevim.org/

Update pkgs/applications/editors/spacevim/default.nix

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>

Update pkgs/applications/editors/spacevim/init.nix

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>

Update pkgs/applications/editors/spacevim/default.nix

Co-authored-by: risson <18313093+rissson@users.noreply.github.com>

+121
+55
pkgs/applications/editors/spacevim/default.nix
···
··· 1 + { ripgrep, gitAndTools, fzf, makeWrapper, vim_configurable, vimPlugins, fetchFromGitHub, writeTextDir 2 + , stdenv, runCommandNoCC, remarshal, formats, spacevim_config ? import ./init.nix }: 3 + with stdenv; 4 + let 5 + format = formats.toml {}; 6 + vim-customized = vim_configurable.customize { 7 + name = "vim"; 8 + # Not clear at the moment how to import plugins such that 9 + # SpaceVim finds them and does not auto download them to 10 + # ~/.cache/vimfiles/repos 11 + vimrcConfig.packages.myVimPackage = with vimPlugins; { start = [ ]; }; 12 + }; 13 + spacevimdir = format.generate "init.toml" spacevim_config; 14 + in mkDerivation rec { 15 + pname = "spacevim"; 16 + version = "1.5.0"; 17 + src = fetchFromGitHub { 18 + owner = "SpaceVim"; 19 + repo = "SpaceVim"; 20 + rev = "v${version}"; 21 + sha256 = "1xw4l262x7wzs1m65bddwqf3qx4254ykddsw3c3p844pb3mzqhh7"; 22 + }; 23 + 24 + nativeBuildInputs = [ makeWrapper vim-customized]; 25 + buildInputs = [ vim-customized ]; 26 + 27 + buildPhase = '' 28 + # generate the helptags 29 + vim -u NONE -c "helptags $(pwd)/doc" -c q 30 + ''; 31 + 32 + patches = [ ./helptags.patch ]; 33 + 34 + installPhase = '' 35 + mkdir -p $out/bin 36 + 37 + cp -r $(pwd) $out/SpaceVim 38 + 39 + # trailing slash very important for SPACEVIMDIR 40 + makeWrapper "${vim-customized}/bin/vim" "$out/bin/spacevim" \ 41 + --add-flags "-u $out/SpaceVim/vimrc" --set SPACEVIMDIR "${spacevimdir}/" \ 42 + --prefix PATH : ${lib.makeBinPath [ fzf gitAndTools.git ripgrep]} 43 + ''; 44 + 45 + meta = with stdenv.lib; { 46 + description = "Modern Vim distribution"; 47 + longDescription = '' 48 + SpaceVim is a distribution of the Vim editor that’s inspired by spacemacs. 49 + ''; 50 + homepage = "https://spacevim.org/"; 51 + license = licenses.gpl3Plus; 52 + maintainers = [ maintainers.fzakaria ]; 53 + platforms = platforms.all; 54 + }; 55 + }
+18
pkgs/applications/editors/spacevim/helptags.patch
···
··· 1 + diff --git a/autoload/SpaceVim.vim b/autoload/SpaceVim.vim 2 + index 16688680..fcafd6f7 100644 3 + --- a/autoload/SpaceVim.vim 4 + +++ b/autoload/SpaceVim.vim 5 + @@ -1255,13 +1255,6 @@ function! SpaceVim#end() abort 6 + let &helplang = 'jp' 7 + endif 8 + "" 9 + - " generate tags for SpaceVim 10 + - let help = fnamemodify(g:_spacevim_root_dir, ':p:h') . '/doc' 11 + - try 12 + - exe 'helptags ' . help 13 + - catch 14 + - call SpaceVim#logger#warn('Failed to generate helptags for SpaceVim') 15 + - endtry 16 + 17 + "" 18 + " set language
+46
pkgs/applications/editors/spacevim/init.nix
···
··· 1 + # The Nix expression is a 1:1 mapping of the spacevim toml config which you can find on their website: spacevim.org/quick-start-guide/#configuration 2 + 3 + { 4 + custom_plugins = [{ 5 + merged = false; 6 + name = "lilydjwg/colorizer"; 7 + }]; 8 + layers = [ 9 + { name = "default"; } 10 + { 11 + enable = true; 12 + name = "colorscheme"; 13 + } 14 + { name = "fzf"; } 15 + { 16 + default_height = 30; 17 + default_position = "top"; 18 + name = "shell"; 19 + } 20 + { name = "edit"; } 21 + { name = "VersionControl"; } 22 + { name = "git"; } 23 + { 24 + auto-completion-return-key-behavior = "complete"; 25 + auto-completion-tab-key-behavior = "cycle"; 26 + autocomplete_method = "coc"; 27 + name = "autocomplete"; 28 + } 29 + { name = "lang#ruby"; } 30 + { name = "lang#nix"; } 31 + { name = "lang#java"; } 32 + { name = "lang#kotlin"; } 33 + { name = "lang#sh"; } 34 + { name = "lang#html"; } 35 + ]; 36 + options = { 37 + buffer_index_type = 4; 38 + colorscheme = "gruvbox"; 39 + colorscheme_bg = "dark"; 40 + enable_guicolors = true; 41 + enable_statusline_mode = true; 42 + enable_tabline_filetype_icon = true; 43 + statusline_separator = "fire"; 44 + timeoutlen = 500; 45 + }; 46 + }
+2
pkgs/top-level/all-packages.nix
··· 2554 2555 socklog = callPackage ../tools/system/socklog { }; 2556 2557 ssmsh = callPackage ../tools/admin/ssmsh { }; 2558 2559 stagit = callPackage ../development/tools/stagit { };
··· 2554 2555 socklog = callPackage ../tools/system/socklog { }; 2556 2557 + spacevim = callPackage ../applications/editors/spacevim { }; 2558 + 2559 ssmsh = callPackage ../tools/admin/ssmsh { }; 2560 2561 stagit = callPackage ../development/tools/stagit { };