1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 07:50:04 +08:00

Compare commits

...

4 Commits

Author SHA1 Message Date
Eric Wong
13fe60ed2e feat(github): enable github action 2024-07-08 17:45:42 +08:00
Eric Wong
ab666f13f1 perf(core): add opt for lazy load config 2024-07-07 22:38:26 +08:00
Eric Wong
72834d9802 chore(colorscheme): use bundle vim-hybrid 2024-07-07 21:56:21 +08:00
Eric Wong
b45b89ee20 perf(tabline): use BufAdd instead of BufNew 2024-07-07 14:42:40 +08:00
35 changed files with 2274 additions and 58 deletions

5
.ci/bootstrap Normal file
View File

@ -0,0 +1,5 @@
#!/bin/sh
# usage: script/bootstrap
#
cd docs && bundle install

6
.ci/build-production Normal file
View File

@ -0,0 +1,6 @@
#!/bin/sh
# usage: script/build-production
#
# Run the jekyll build
cd docs && bundle exec jekyll build

View File

@ -0,0 +1,75 @@
exe 'set nocp'
set rtp+=/build/GitHub.vim
set rtp+=/API
so /build/GitHub.vim/plugin/github.vim
let s:LIST = SpaceVim#api#import('data#list')
let s:log = filereadable('build_log') ? system('cat build_log') : ''
let g:githubapi_verbose = 1
function! s:update_log(log, summary, new_log) abort
let log = split(a:log, "\n")
let begin = -1
let end = -1
for i in range(len(log))
if log[i] =~ a:summary
let begin = i
endif
if begin != -1 && log[i] ==# '</details>'
let end = i
endif
endfor
if begin != -1 && end != -1
return s:LIST.replace(log, begin, end, split(a:new_log, "\n"))
else
return a:log . "\n" . a:new_log
endif
endfunction
if !empty(s:log)
if $LINT ==# 'vader'
let s:summary = $VIM . ' ' . $LINT . ' build log'
else
let s:summary = $LINT . ' build log'
endif
let s:log = '<details><summary>' . s:summary . "</summary>\n" . s:log . "\n</details>"
let s:comments = github#api#issues#List_comments('SpaceVim', 'SpaceVim',$TRAVIS_PULL_REQUEST ,'')
if empty(s:comments)
call github#api#issues#Create_comment('SpaceVim','SpaceVim', $TRAVIS_PULL_REQUEST, {'body': s:log}, 'SpaceVimBot', $BOTSECRET)
else
let s:nr = 0
for s:comment in s:comments
if s:comment.user.login ==# 'SpaceVimBot'
let s:nr = s:comment.id
break
endif
endfor
if s:nr == 0
call github#api#issues#Create_comment('SpaceVim','SpaceVim', $TRAVIS_PULL_REQUEST, {'body': s:log}, 'SpaceVimBot', $BOTSECRET)
else
call github#api#issues#Edit_comment('SpaceVim','SpaceVim', s:nr,
\ {'body': s:update_log(s:comment.body, s:summary, s:log)}, 'SpaceVimBot', $BOTSECRET)
endif
endif
else
if $LINT ==# 'vader'
let s:summary = $VIM . ' ' . $LINT . ' build log'
else
let s:summary = $LINT . ' build log'
endif
let s:log = '<details><summary>' . s:summary . "</summary>\n" . s:log . "\n</details>"
let s:comments = github#api#issues#List_comments('SpaceVim', 'SpaceVim',$TRAVIS_PULL_REQUEST ,'')
if !empty(s:comments)
let s:nr = 0
for s:comment in s:comments
if s:comment.user.login ==# 'SpaceVimBot'
let s:nr = s:comment.id
break
endif
endfor
if s:nr != 0
call github#api#issues#Edit_comment('SpaceVim','SpaceVim', s:nr,
\ {'body': s:update_log(s:comment.body, s:summary, s:log)}, 'SpaceVimBot', $BOTSECRET)
endif
endif
endif
echom v:shell_error
quit

455
.ci/detach_plugin.sh Normal file
View File

@ -0,0 +1,455 @@
#!/usr/bin/env bash
_detact () {
cp -f ../../$1 $1
}
_detact_bundle () {
cp -f ../../bundle/$1/$2 $2
}
_checkdir () {
if [[ ! -d "$1" ]]; then
mkdir -p $1
fi
}
_default_readme () {
cat <<EOT > README.md
# $1
> $2
This plugin is automatically detach from [SpaceVim](https://github.com/SpaceVim/SpaceVim/). you can use it without SpaceVim.
EOT
}
main () {
case "$1" in
flygrep)
git clone https://github.com/wsdjeg/FlyGrep.vim.git detach/$1
cd detach/$1
_checkdir syntax/
_checkdir autoload/SpaceVim/api
_checkdir autoload/SpaceVim/api/vim
_checkdir autoload/SpaceVim/api/neovim
_checkdir autoload/SpaceVim/api/data
_checkdir autoload/SpaceVim/mapping
_checkdir autoload/SpaceVim/plugins
_detact autoload/SpaceVim/plugins/flygrep.vim
_detact autoload/SpaceVim/api.vim
_detact autoload/SpaceVim/api/logger.vim
_detact autoload/SpaceVim/api/vim/buffer.vim
_detact autoload/SpaceVim/api/vim/regex.vim
_detact autoload/SpaceVim/api/vim/compatible.vim
_detact autoload/SpaceVim/api/vim/floating.vim
_detact autoload/SpaceVim/api/vim/highlight.vim
_detact autoload/SpaceVim/api/vim/statusline.vim
_detact autoload/SpaceVim/api/vim/window.vim
_detact autoload/SpaceVim/api/neovim/floating.vim
_detact autoload/SpaceVim/api/data/dict.vim
_detact autoload/SpaceVim/api/data/list.vim
_detact autoload/SpaceVim/api/data/json.vim
_detact autoload/SpaceVim/api/data/string.vim
_detact autoload/SpaceVim/api/prompt.vim
_detact autoload/SpaceVim/api/job.vim
_detact autoload/SpaceVim/api/vim.vim
_detact autoload/SpaceVim/api/file.vim
_detact autoload/SpaceVim/api/system.vim
_detact autoload/SpaceVim/api/time.vim
_detact autoload/SpaceVim/mapping/search.vim
_detact autoload/SpaceVim/logger.vim
# detach lua version flygrep
_checkdir lua/spacevim/api
_checkdir lua/spacevim/api/vim
_checkdir lua/spacevim/plugin
_detact lua/spacevim/plugin/flygrep.lua
_detact lua/spacevim/plugin/search.lua
_detact lua/spacevim.lua
_detact lua/spacevim/logger.lua
_detact lua/spacevim/api.lua
_detact lua/spacevim/api/logger.lua
_detact lua/spacevim/api/prompt.lua
_detact lua/spacevim/api/notify.lua
_detact lua/spacevim/api/password.lua
_detact lua/spacevim/api/vim.lua
_detact lua/spacevim/api/system.lua
_detact lua/spacevim/api/vim/compatible.lua
_detact lua/spacevim/api/vim/highlight.lua
_detact lua/spacevim/api/vim/regex.lua
_detact lua/spacevim/api/vim/keys.lua
_detact lua/spacevim/api/vim/buffer.lua
_detact lua/spacevim/api/vim/window.lua
_detact lua/spacevim/api/vim/statusline.lua
# detach syntax/ftplugin etc
_detact syntax/SpaceVimFlyGrep.vim
# detach bundle
_checkdir plugin
_detact_bundle FlyGrep plugin/FlyGrep.vim
_detact_bundle FlyGrep README.md
_detact_bundle FlyGrep addon-info.json
_checkdir doc/
_detact_bundle FlyGrep doc/FlyGrep.txt
# detach LICENSE
_detact LICENSE
# detach test vimrc
_checkdir test
_detact_bundle FlyGrep test/vimrc
git add .
git config user.email "wsdjeg@qq.com"
git config user.name "SpaceVimBot"
git commit -m "Auto Update based on https://github.com/SpaceVim/SpaceVim/commit/${GITHUB_SHA}"
git remote add wsdjeg_flygrep https://SpaceVimBot:${BOTSECRET}@github.com/wsdjeg/FlyGrep.vim.git
git push wsdjeg_flygrep master
cd -
rm -rf detach/$1
exit 0
;;
dein-ui)
git clone https://github.com/wsdjeg/dein-ui.vim.git detach/$1
cd detach/$1
_checkdir syntax/
_checkdir autoload/SpaceVim/api
_checkdir autoload/SpaceVim/api/data
_checkdir autoload/SpaceVim/api/vim
_checkdir autoload/SpaceVim/mapping
_checkdir autoload/SpaceVim/plugins
_detact autoload/SpaceVim/plugins/manager.vim
_detact autoload/SpaceVim/api.vim
_detact autoload/SpaceVim/commands.vim
_detact autoload/SpaceVim/logger.vim
_detact autoload/SpaceVim/api/job.vim
_detact autoload/SpaceVim/api/system.vim
_detact autoload/SpaceVim/api/data/list.vim
_detact autoload/SpaceVim/api/vim/compatible.vim
_detact syntax/SpaceVimPlugManager.vim
_detact LICENSE
git add .
git config user.email "wsdjeg@qq.com"
git config user.name "SpaceVimBot"
git commit -m "Auto Update based on https://github.com/SpaceVim/SpaceVim/commit/${GITHUB_SHA}"
git remote add wsdjeg_dein_ui https://SpaceVimBot:${BOTSECRET}@github.com/wsdjeg/dein-ui.vim.git
git push wsdjeg_dein_ui master
cd -
rm -rf detach/$1
exit 0
;;
iedit)
git clone https://github.com/wsdjeg/iedit.vim.git detach/$1
cd detach/$1
_checkdir autoload/SpaceVim/api/vim
_checkdir autoload/SpaceVim/api/data
_checkdir autoload/SpaceVim/plugins
_detact autoload/SpaceVim/api.vim
_detact autoload/SpaceVim/api/vim/compatible.vim
_detact autoload/SpaceVim/api/vim/highlight.vim
_detact autoload/SpaceVim/api/data/string.vim
_detact autoload/SpaceVim/plugins/iedit.vim
_checkdir autoload/plugin
cat <<EOT > autoload/plugin/iedit.vim
"=============================================================================
" iedit.vim --- multiple cursor support for neovim and vim
" Copyright (c) 2016-2022 Shidong Wang & Contributors
" Author: Shidong Wang < wsdjeg@outlook.com >
" URL: https://github.com/wsdjeg/iedit.vim
" License: MIT license
"=============================================================================
""
" @section Introduction, intro
" @stylized iedit.vim
" @library
" @order intro version dicts functions exceptions layers api faq
" multiple cursor in vim, written in pure vim script for MacVim, gvim and vim version
" 8.0+.
"
command! -nargs=0 Iedit call SpaceVim#plugins#iedit#start()
EOT
_detact LICENSE
_default_readme "iedit.vim" "multiple cussor support for Vim/Neovim"
git add .
git config user.email "wsdjeg@qq.com"
git config user.name "SpaceVimBot"
git commit -m "Auto Update"
git remote add wsdjeg_vim_todo https://SpaceVimBot:${BOTSECRET}@github.com/wsdjeg/iedit.vim.git
git push wsdjeg_vim_todo master
cd -
rm -rf detach/$1
exit 0
;;
vim-todo)
git clone https://github.com/wsdjeg/vim-todo.git detach/$1
cd detach/$1
_checkdir syntax/
_detact syntax/SpaceVimTodoManager.vim
_checkdir autoload/SpaceVim/api/vim
_checkdir autoload/SpaceVim/api/data
_checkdir autoload/SpaceVim/plugins
_checkdir autoload/SpaceVim/mapping
_detact autoload/SpaceVim/api.vim
_detact autoload/SpaceVim/api/logger.vim
_detact autoload/SpaceVim/api/job.vim
_detact autoload/SpaceVim/api/system.vim
_detact autoload/SpaceVim/api/data/string.vim
_detact autoload/SpaceVim/api/file.vim
_detact autoload/SpaceVim/api/vim/buffer.vim
_detact autoload/SpaceVim/api/vim/regex.vim
_detact autoload/SpaceVim/api/vim/compatible.vim
_detact autoload/SpaceVim/logger.vim
_detact autoload/SpaceVim/mapping/search.vim
_detact autoload/SpaceVim/plugins/todo.vim
_checkdir plugin
cat <<EOT > plugin/todo.vim
"=============================================================================
" todo.vim --- todo manager for SpaceVim
" Copyright (c) 2016-2023 Wang Shidong & Contributors
" Author: Wang Shidong < wsdjeg@outlook.com >
" URL: https://spacevim.org
" License: GPLv3
"=============================================================================
command! OpenTodo call todo#open()
EOT
_detact LICENSE
git add .
git config user.email "wsdjeg@qq.com"
git config user.name "SpaceVimBot"
git commit -m "Auto Update"
git remote add wsdjeg_vim_todo https://SpaceVimBot:${BOTSECRET}@github.com/wsdjeg/vim-todo.git
git push wsdjeg_vim_todo master
cd -
rm -rf detach/$1
exit 0
;;
vim-chat)
git clone https://github.com/wsdjeg/vim-chat.git detach/$1
cd detach/$1
_detact LICENSE
_checkdir autoload/SpaceVim/api
_detact autoload/SpaceVim/api.vim
_detact autoload/SpaceVim/api/job.vim
_checkdir autoload/chat/
_detact_bundle vim-chat autoload/chat.vim
_detact_bundle vim-chat autoload/chat/gitter.vim
_detact_bundle vim-chat autoload/chat/logger.vim
_detact_bundle vim-chat autoload/chat/notify.vim
_detact_bundle vim-chat autoload/chat/qq.vim
_detact_bundle vim-chat autoload/chat/weixin.vim
_checkdir doc/
_detact_bundle vim-chat doc/vim-chat.txt
_checkdir syntax/
_detact_bundle vim-chat syntax/vimchat.vim
_detact_bundle vim-chat addon-info.json
_detact_bundle vim-chat README.md
git add .
git config user.email "wsdjeg@qq.com"
git config user.name "SpaceVimBot"
git commit -m "Auto Update based on https://github.com/SpaceVim/SpaceVim/commit/${GITHUB_SHA}"
git remote add wsdjeg_vim_chat https://SpaceVimBot:${BOTSECRET}@github.com/wsdjeg/vim-chat.git
git push wsdjeg_vim_chat master
cd -
rm -rf detach/$1
exit 0
;;
JavaUnit.vim)
git clone https://github.com/wsdjeg/JavaUnit.vim.git detach/$1
cd detach/$1
# _detact LICENSE
# _checkdir autoload/SpaceVim/api
# _detact autoload/SpaceVim/api.vim
# _detact autoload/SpaceVim/api/job.vim
# _checkdir autoload/chat/
_detact_bundle JavaUnit.vim README.md
git add .
git config user.email "wsdjeg@qq.com"
git config user.name "SpaceVimBot"
git commit -m "Auto Update based on https://github.com/SpaceVim/SpaceVim/commit/${GITHUB_SHA}"
git remote add wsdjeg_javaunit_vim https://SpaceVimBot:${BOTSECRET}@github.com/wsdjeg/JavaUnit.vim.git
git push wsdjeg_javaunit_vim master
cd -
rm -rf detach/$1
exit 0
;;
git.vim)
git clone https://github.com/wsdjeg/git.vim.git detach/$1
cd detach/$1
_checkdir autoload/SpaceVim/api
_detact autoload/SpaceVim/api.vim
_detact autoload/SpaceVim/api/job.vim
_detact_bundle git.vim LICENSE
_detact_bundle git.vim README.md
_detact_bundle git.vim addon-info.json
_checkdir autoload/git/branch
_detact_bundle git.vim autoload/git.vim
_detact_bundle git.vim autoload/git/add.vim
_detact_bundle git.vim autoload/git/blame.vim
_detact_bundle git.vim autoload/git/branch.vim
_detact_bundle git.vim autoload/git/branch/manager.vim
_detact_bundle git.vim autoload/git/checkout.vim
_detact_bundle git.vim autoload/git/cherry_pick.vim
_detact_bundle git.vim autoload/git/clean.vim
_detact_bundle git.vim autoload/git/commit.vim
_detact_bundle git.vim autoload/git/config.vim
_detact_bundle git.vim autoload/git/diff.vim
_detact_bundle git.vim autoload/git/fetch.vim
_detact_bundle git.vim autoload/git/log.vim
_detact_bundle git.vim autoload/git/logger.vim
_detact_bundle git.vim autoload/git/merge.vim
_detact_bundle git.vim autoload/git/mv.vim
_detact_bundle git.vim autoload/git/pull.vim
_detact_bundle git.vim autoload/git/push.vim
_detact_bundle git.vim autoload/git/rebase.vim
_detact_bundle git.vim autoload/git/reflog.vim
_detact_bundle git.vim autoload/git/remote.vim
_detact_bundle git.vim autoload/git/reset.vim
_detact_bundle git.vim autoload/git/rm.vim
_detact_bundle git.vim autoload/git/stash.vim
_detact_bundle git.vim autoload/git/status.vim
_checkdir doc
_detact_bundle git.vim doc/git.txt
_checkdir plugin
_detact_bundle git.vim plugin/git.vim
_checkdir syntax
_detact_bundle git.vim syntax/git-blame.vim
_detact_bundle git.vim syntax/git-commit.vim
_detact_bundle git.vim syntax/git-config.vim
_detact_bundle git.vim syntax/git-log.vim
_detact_bundle git.vim syntax/git-rebase.vim
_detact_bundle git.vim syntax/git-reflog.vim
_checkdir test
_detact_bundle git.vim test/vimrc
git add .
git config user.email "wsdjeg@qq.com"
git config user.name "SpaceVimBot"
git commit -m "Auto Update based on https://github.com/SpaceVim/SpaceVim/commit/${GITHUB_SHA}"
git remote add wsdjeg_git_vim https://SpaceVimBot:${BOTSECRET}@github.com/wsdjeg/git.vim.git
git push wsdjeg_git_vim master
cd -
rm -rf detach/$1
exit 0
;;
vim-cheat)
git clone https://github.com/wsdjeg/vim-cheat.git detach/$1
cd detach/$1
_checkdir plugin/
_checkdir autoload/
_detact LICENSE
_detact_bundle vim-cheat autoload/cheat.vim
_detact_bundle vim-cheat plugin/cheat.vim
_detact_bundle vim-cheat README.md
_detact_bundle vim-cheat .travis.yml
_detact_bundle vim-cheat .vintrc.yaml
_checkdir doc/
_detact_bundle vim-cheat doc/vim-cheat.txt
git add .
git config user.email "wsdjeg@qq.com"
git config user.name "SpaceVimBot"
git commit -m "Auto Update based on https://github.com/SpaceVim/SpaceVim/commit/${GITHUB_SHA}"
git remote add wsdjeg_vim_cheat https://SpaceVimBot:${BOTSECRET}@github.com/wsdjeg/vim-cheat.git
git push wsdjeg_vim_cheat master
cd -
rm -rf detach/$1
exit 0
;;
xmake.vim)
git clone https://github.com/wsdjeg/xmake.vim.git detach/$1
cd detach/$1
_checkdir plugin/
_detact_bundle xmake.vim plugin/xmake.vim
_detact_bundle xmake.vim plugin/xmgen.py
_checkdir autoload/
_detact_bundle xmake.vim autoload/xmake.vim
_detact_bundle xmake.vim autoload/spy.lua
_detact LICENSE
_default_readme "xmake.vim" "xmake support for neovim/vim"
_checkdir autoload/xmake/
_detact_bundle xmake.vim autoload/xmake/log.vim
_checkdir doc/
_detact_bundle xmake.vim doc/xmake.txt
_checkdir UltiSnips/
_detact_bundle xmake.vim UltiSnips/lua.snippets
_checkdir rplugin/python3/deoplete/sources/docs/
_detact_bundle xmake.vim rplugin/python3/deoplete/sources/xmake.py
_detact_bundle xmake.vim rplugin/python3/deoplete/sources/docs/add_defines
_detact_bundle xmake.vim rplugin/python3/deoplete/sources/docs/add_defines
_detact_bundle xmake.vim rplugin/python3/deoplete/sources/docs/add_deps
_detact_bundle xmake.vim rplugin/python3/deoplete/sources/docs/add_files
_detact_bundle xmake.vim rplugin/python3/deoplete/sources/docs/add_headers
_detact_bundle xmake.vim rplugin/python3/deoplete/sources/docs/add_includedirs
_detact_bundle xmake.vim rplugin/python3/deoplete/sources/docs/add_linkdirs
_detact_bundle xmake.vim rplugin/python3/deoplete/sources/docs/add_links
_detact_bundle xmake.vim rplugin/python3/deoplete/sources/docs/add_subdirs
_detact_bundle xmake.vim rplugin/python3/deoplete/sources/docs/is_os
_detact_bundle xmake.vim rplugin/python3/deoplete/sources/docs/is_plat
_detact_bundle xmake.vim rplugin/python3/deoplete/sources/docs/set_basename
_detact_bundle xmake.vim rplugin/python3/deoplete/sources/docs/set_headerdir
_detact_bundle xmake.vim rplugin/python3/deoplete/sources/docs/set_kind
_detact_bundle xmake.vim rplugin/python3/deoplete/sources/docs/set_languages
_detact_bundle xmake.vim rplugin/python3/deoplete/sources/docs/set_objectdir
_detact_bundle xmake.vim rplugin/python3/deoplete/sources/docs/set_optimize
_detact_bundle xmake.vim rplugin/python3/deoplete/sources/docs/set_project
_detact_bundle xmake.vim rplugin/python3/deoplete/sources/docs/set_strip
_detact_bundle xmake.vim rplugin/python3/deoplete/sources/docs/set_symbols
_detact_bundle xmake.vim rplugin/python3/deoplete/sources/docs/set_targetdir
_detact_bundle xmake.vim rplugin/python3/deoplete/sources/docs/set_warnings
git add .
git config user.email "wsdjeg@qq.com"
git config user.name "SpaceVimBot"
git commit -m "Auto Update based on https://github.com/SpaceVim/SpaceVim/commit/${GITHUB_SHA}"
git remote add wsdjeg_xmake_vim https://SpaceVimBot:${BOTSECRET}@github.com/wsdjeg/xmake.vim.git
git push wsdjeg_xmake_vim master
cd -
rm -rf detach/$1
exit 0
;;
scrollbar.vim)
git clone https://github.com/wsdjeg/scrollbar.vim.git detach/$1
cd detach/$1
_checkdir autoload/SpaceVim/api/
_checkdir autoload/SpaceVim/api/vim
_detact autoload/SpaceVim/api.vim
_detact autoload/SpaceVim/api/vim.vim
_detact autoload/SpaceVim/api/vim/buffer.vim
_detact autoload/SpaceVim/api/vim/window.vim
_checkdir autoload/SpaceVim/plugins/
_detact autoload/SpaceVim/plugins/scrollbar.vim
_detact LICENSE
_default_readme "scrollbar.vim" "floating scrollbar support for neovim/vim[wip]"
git add .
git config user.email "wsdjeg@qq.com"
git config user.name "SpaceVimBot"
git commit -m "Auto Update based on https://github.com/SpaceVim/SpaceVim/commit/${GITHUB_SHA}"
git remote add wsdjeg_scrollbar https://SpaceVimBot:${BOTSECRET}@github.com/wsdjeg/scrollbar.vim.git
git push wsdjeg_scrollbar master
cd -
rm -rf detach/$1
exit 0
;;
github.vim)
git clone https://github.com/wsdjeg/GitHub.vim.git detach/$1
cd detach/$1
_checkdir plugin/
_checkdir autoload/
_detact LICENSE
_detact_bundle github.vim autoload/github.vim
_detact_bundle github.vim plugin/github.vim
_default_readme "GitHub.vim" "GitHub API support for neovim/vim[wip]"
_checkdir doc/
_detact_bundle github doc/github.txt
git add .
git config user.email "wsdjeg@qq.com"
git config user.name "SpaceVimBot"
git commit -m "Auto Update based on https://github.com/SpaceVim/SpaceVim/commit/${GITHUB_SHA}"
git remote add wsdjeg_github_vim https://SpaceVimBot:${BOTSECRET}@github.com/wsdjeg/GitHub.vim.git
git push wsdjeg_github_vim master
cd -
rm -rf detach/$1
exit 0
;;
spacevim-theme)
exit 0
esac
}
main $@

64
.ci/install/linux.sh Normal file
View File

@ -0,0 +1,64 @@
#!/usr/bin/env bash
# Fail on unset variables and command errors
set -ue -o pipefail
# Prevent commands misbehaving due to locale differences
export LC_ALL=C
install_vim() {
local URL=https://github.com/vim/vim
local tag=$1
local ext=$([[ $tag == "nightly" ]] && echo "" || echo "-b $tag")
local tmp="$(mktemp -d)"
local out="${DEPS}/_vim/$tag"
mkdir -p $out
git clone --depth 1 --single-branch $ext $URL $tmp
cd $tmp
# Apply Vim patch v8.0.1635 to fix build with Python.
if grep -q _POSIX_THREADS src/if_python3.c; then
sed -i '/#ifdef _POSIX_THREADS/,+2 d' src/if_python3.c
fi
./configure \
--with-features=huge \
--enable-pythoninterp \
--enable-python3interp \
--enable-luainterp \
--prefix=${out}
make
make install
}
install_nvim() {
local URL=https://github.com/neovim/neovim
local tag=$1
local tmp="$(mktemp -d)"
local out="${DEPS}/_neovim/$tag"
mkdir -p $out
curl -o $tmp/nvim-linux64.tar.gz -L "https://github.com/neovim/neovim/releases/download/$tag/nvim-linux64.tar.gz"
tar -xzvf $tmp/nvim-linux64.tar.gz -C $tmp
cp -r $tmp/nvim-linux64/* $out
chmod +x $out/bin/nvim
# fix ModuleNotFoundError: No module named 'setuptools'
python3 -m pip install -U setuptools
python3 -m pip install pynvim
}
install() {
local vim=$1
local tag=$2
if [[ -d "${DEPS}/_$vim/$tag/bin" ]]; then
echo "Use a cached version '$HOME/_$vim/$tag'."
return
fi
if [[ $vim == "nvim" ]]; then
install_nvim $tag
else
install_vim $tag
fi
}
install $@

63
.ci/install/windows.ps1 Normal file
View File

@ -0,0 +1,63 @@
function install_vim($ver)
{
if ($ver -eq "nightly")
{
$url = 'https://github.com/vim/vim-win32-installer/releases/download/v8.2.3361/gvim_8.2.3361_x86.zip'
}
else
{
$ver = $ver -replace "^v", ""
$url = 'https://github.com/vim/vim-win32-installer/releases/download/v' + $ver + '/gvim_' + $ver + '_x86.zip'
}
$Env:VIM_BIN = $Env:DEPS + '\vim\vim82\vim.exe'
$zip = $Env:DEPS + '\vim.zip'
echo "download: $url"
echo "path: $zip"
(New-Object Net.WebClient).DownloadFile($url, $zip)
[Reflection.Assembly]::LoadWithPartialName('System.IO.Compression.FileSystem') > $null
[System.IO.Compression.ZipFile]::ExtractToDirectory($zip, $Env:DEPS)
}
function install_nvim($ver)
{
if ($ver -eq "nightly")
{
$url = 'https://github.com/neovim/neovim/releases/download/nightly/nvim-win64.zip'
}
else
{
$url = 'https://github.com/neovim/neovim/releases/download/' + $ver + '/nvim-win64.zip'
}
$zip = $Env:DEPS + '\nvim.zip'
(New-Object Net.WebClient).DownloadFile($url, $zip)
[Reflection.Assembly]::LoadWithPartialName('System.IO.Compression.FileSystem') > $null
[System.IO.Compression.ZipFile]::ExtractToDirectory($zip, $Env:DEPS)
if (Test-Path '$DEPS\Neovim\bin\nvim.exe') {
$Env:VIM_BIN = $Env:DEPS + '\Neovim\bin\nvim.exe'
}else{
$Env:VIM_BIN = $Env:DEPS + '\nvim-win64\bin\nvim.exe'
}
echo "VIM_BIN is: $Env:VIM_BIN"
}
function download_lua()
{
$url = 'https://github.com/wsdjeg/vim-galore-zh_cn/releases/download/downdows/lua53.zip'
$zip = $Env:DEPS + '\lua53.zip'
(New-Object Net.WebClient).DownloadFile($url, $zip)
[Reflection.Assembly]::LoadWithPartialName('System.IO.Compression.FileSystem') > $null
[System.IO.Compression.ZipFile]::ExtractToDirectory($zip, $Env:DEPS + '\vim\vim82')
}
if ($Env:VIM_BIN.StartsWith("nvim"))
{
mkdir $Env:DEPS
install_nvim $Env:VIM_TAG
}
elseif ($Env:VIM_BIN.StartsWith("vim"))
{
mkdir $Env:DEPS
install_vim $Env:VIM_TAG
download_lua
}

10
.ci/push_baidu.sh Normal file
View File

@ -0,0 +1,10 @@
#!/usr/bin/env bash
date_en=`cat docs/_site/sitemap.xml`
date_cn=`cat docs/_site/cn/sitemap.xml`
echo $date_en | grep -oP 'https://spacevim[^\<]*' > urls_en.txt
echo $date_cn | grep -oP 'https://spacevim[^\<]*' > urls_cn.txt
curl -H 'Content-Type:text/plain' --data-binary @urls_en.txt "http://data.zz.baidu.com/urls?site=spacevim.org&token=4MYgdYW7QHIaM01P"
curl -H 'Content-Type:text/plain' --data-binary @urls_cn.txt "http://data.zz.baidu.com/urls?site=spacevim.org&token=4MYgdYW7QHIaM01P"

89
.ci/script.sh Normal file
View File

@ -0,0 +1,89 @@
#!/usr/bin/env bash
set -ex
export TRAVIS_PULL_REQUEST=${TRAVIS_PULL_REQUEST}
if [ "$LINT" = "vimlint" ]; then
if [[ -f build_log ]]; then
rm build_log
fi
for file in $(git ls-files | grep SpaceVim.*.vim);
do
/tmp/vimlint/bin/vimlint.sh -l /tmp/vimlint -p /tmp/vimlparser $file >> build_log 2>&1;
done
if [[ -s build_log ]]; then
exit 2
fi
elif [ "$LINT" = "vimlint-errors" ]; then
if [[ -f build_log ]]; then
rm build_log
fi
for file in $(git ls-files | grep SpaceVim.*.vim);
do
/tmp/vimlint/bin/vimlint.sh -E -l /tmp/vimlint -p /tmp/vimlparser $file >> build_log 2>&1;
done
if [[ -s build_log ]]; then
exit 2
fi
elif [ "$LINT" = "file-encoding" ]; then
if [[ -f build_log ]]; then
rm build_log
fi
for file in $(git diff --name-only HEAD master);
do
# get the encoding of a file, based on:
# https://superuser.com/a/351658/618193
# It should be -b instead of -bi
encoding=`file -b --mime-encoding $file`
if [ $encoding != "utf-8" ] && [ $encoding != "us-ascii" ];
then
echo $file " " $encoding >> build_log
fi
done
if [[ -s build_log ]]; then
exit 2
fi
elif [ "$LINT" = "vint" ]; then
if [[ -f build_log ]]; then
rm build_log
fi
for file in $(git ls-files | grep SpaceVim.*.vim);
do
vint --enable-neovim $file >> build_log 2>&1;
done
if [[ -s build_log ]]; then
exit 2
fi
elif [ "$LINT" = "vint-errors" ]; then
if [[ -f build_log ]]; then
rm build_log
fi
for file in $(git ls-files | grep SpaceVim.*.vim);
do
vint --enable-neovim --error $file >> build_log 2>&1;
done
if [[ -s build_log ]]; then
exit 2
fi
elif [ "$LINT" = "vader" ]; then
if [ "$VIM_BIN" = "nvim" ]; then
export PATH="${DEPS}/_neovim/${VIM_TAG}/bin:${PATH}"
export VIM="${DEPS}/_neovim/${VIM_TAG}/share/nvim/runtime"
else
export PATH="${DEPS}/_vim/${VIM_TAG}/bin:${PATH}"
export VIM="${DEPS}/_vim/${VIM_TAG}/share/vim"
fi
echo "\$PATH: \"${PATH}\""
echo "\$VIM: \"${VIM}\""
echo "================= ${VIM_BIN} version ======================"
$VIM_BIN --version
pip install covimerage
pip install codecov
python -c 'import os,sys,fcntl; flags = fcntl.fcntl(sys.stdout, fcntl.F_GETFL); fcntl.fcntl(sys.stdout, fcntl.F_SETFL, flags&~os.O_NONBLOCK);'
make test_coverage
covimerage -vv xml --omit 'build/*'
codecov -X search gcov pycov -f coverage.xml
elif [ "$LINT" = "jekyll" ]; then
.ci/build-production
fi
set +x

46
.ci/update_mirror.sh Normal file
View File

@ -0,0 +1,46 @@
#!/usr/bin/env bash
usage () {
echo ".ci/update_remote.sh [option] [target]"
}
push_gitee()
{
git remote add gitee https://SpaceVimBot:${BOTSECRET}@gitee.com/spacevim/SpaceVim.git
git push gitee master -f
}
push_gitlab()
{
git remote add gitlab https://SpaceVimBot:${BOTSECRET}@gitlab.com/SpaceVim/SpaceVim.git
git push gitlab master -f
}
push_coding()
{
git remote add coding https://spacevim%40outlook.com:${CODINGBOTSECRET}@e.coding.net/spacevim/SpaceVim.git
git push coding master -f
}
main () {
case $1 in
--help|-h)
usage
exit 0
;;
gitee)
push_gitee
exit 0
;;
gitlab)
push_gitlab
exit 0
;;
coding)
push_coding
exit 0
;;
esac
}
main $@

22
.github/CODEOWNERS vendored Normal file
View File

@ -0,0 +1,22 @@
# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence,
# @wsdjeg will be requested for review when someone opens a
# pull request.
# Just watching this repo, disable duplicate message
# * @wsdjeg
# lang#julia layer
autoload/SpaceVim/layers/lang/julia.vim @jingpengw
docs/layers/lang/julia.md @jingpengw
docs/cn/layers/lang/julia.md @jingpengw
# lang#javascript layer
autoload/SpaceVim/layers/lang/javascript.vim @zhujinxuan @S1ngS1ng @chemzqm
docs/layers/lang/javascript.md @zhujinxuan @S1ngS1ng @chemzqm
docs/cn/layers/lang/javascript.md @zhujinxuan @S1ngS1ng @chemzqm
# lang#erlang layer
autoload/SpaceVim/layers/lang/erlang.vim @suzuiyuegjy
docs/layers/lang/erlang.md @suzuiyuegjy
docs/cn/layers/lang/erlang.md @suzuiyuegjy

1
.github/FUNDING.yml vendored Normal file
View File

@ -0,0 +1 @@
custom: https://spacevim.org/sponsors/

29
.github/ISSUE_TEMPLATE/bug-report.yml vendored Normal file
View File

@ -0,0 +1,29 @@
name: Bug Report
description: File a bug report
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
- type: textarea
id: expected-behavior
attributes:
label: Expected behavior.
description: What is the expected behavior?
validations:
required: true
- type: textarea
id: reproduce-step
attributes:
label: The reproduce ways from Vim starting.
description: The reproduce ways are needed to debug.
placeholder: Tell us what you see!
value: "A bug happened!"
validations:
required: true
- type: textarea
id: SPDebugInfo
attributes:
label: Output of the `:SPDebugInfo!`
description: Please copy and paste the result of :SPDebugInfo! command.

5
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Community Support
url: https://app.element.io/#/room/#spacevim:matrix.org
about: Please ask and answer questions here.

View File

@ -0,0 +1,28 @@
name: Feature Request
description: request an new feature
labels: ["feature request"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this feature request!
- type: textarea
id: feature-description
attributes:
label: Is your feature request related to a problem? Please describe..
description: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
validations:
required: true
- type: textarea
id: feature-solution
attributes:
label: Describe the solution you'd like.
description: A clear and concise description of what you want to happen.
validations:
required: true
- type: textarea
id: additional-context
attributes:
label: Additional context
description: Add any other context or screenshots about the feature request here.

13
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@ -0,0 +1,13 @@
### PR Prelude
Thank you for working on SpaceVim! :)
Please complete these steps and check these boxes before filing your PR:
- [ ] I have read and understood SpaceVim's [CONTRIBUTING](https://github.com/SpaceVim/SpaceVim/blob/master/CONTRIBUTING.md) document.
- [ ] I have read and understood SpaceVim's [CODE_OF_CONDUCT](https://github.com/SpaceVim/SpaceVim/blob/master/CODE_OF_CONDUCT.md) document.
- [ ] I understand my PR may be closed if it becomes obvious I didn't actually perform all of these steps.
### Why this change is necessary and useful?
[Please explain **in detail** why the changes in this PR are needed.]

15
.github/SUPPORT.md vendored Normal file
View File

@ -0,0 +1,15 @@
SpaceVim is an open source project.
Currently, this project is maintained by [@wsdjeg](https://github.com/wsdjeg),
If you use SpaceVim in your daily work and feel that it has made your life easier,
please consider supporting SpaceVim by:
- [Become a backer on opencollective](https://opencollective.com/spacevim)
- [Become a backer on Bountysource](https://salt.bountysource.com/teams/spacevim)
Also, you can buy me a coffee via ko-fi.com or wechat:
<a href='https://ko-fi.com/SpaceVim' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://az743702.vo.msecnd.net/cdn/kofi4.png?v=f' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
| wechat | alipay |
| ------------------------------------------------------------------------ | -------------------------------------------------------------------------- |
| <img src="https://spacevim.org/img/weixin.png" height="150" width="150"> | <img src="https://spacevim.org/img/zhifubao.png" height="150" width="150"> |

18
.github/workflows/async.yml vendored Normal file
View File

@ -0,0 +1,18 @@
name: Detach Plugins
on: [push]
jobs:
check:
strategy:
fail-fast: false
matrix:
detachPlugin: ["flygrep", "dein-ui", "vim-todo", "iedit", "scrollbar.vim", "vim-chat", "vim-cheat", "xmake.vim", "github.vim", "JavaUnit.vim", "git.vim"]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Detach ${{ matrix.detachPlugin }}
env:
BOTSECRET: ${{ secrets.BOTSECRET_GITHUB }}
run: .ci/detach_plugin.sh ${{ matrix.detachPlugin }}

201
.github/workflows/check.yml vendored Normal file
View File

@ -0,0 +1,201 @@
name: test
on: [push, pull_request]
jobs:
Linux:
strategy:
fail-fast: false
matrix:
include:
- vimbin: vim
vimtag: v7.4.052
disable_es: true
- vimbin: vim
vimtag: v7.4.629
disable_es: true
- vimbin: vim
vimtag: v7.4.1689
disable_es: true
- vimbin: vim
vimtag: v8.0.0027
disable_es: true
- vimbin: vim
vimtag: v8.0.0183
disable_es: true
- vimbin: vim
vimtag: v8.0.0184
- vimbin: vim
vimtag: v8.0.1453
- vimbin: vim
vimtag: v8.1.2269
- vimbin: vim
vimtag: v8.2.2434
- vimbin: vim
vimtag: v8.2.3995
- vimbin: vim
vimtag: nightly
- vimbin: nvim
vimtag: nightly
- vimbin: nvim
vimtag: v0.9.1
- vimbin: nvim
vimtag: v0.9.0
- vimbin: nvim
vimtag: v0.8.3
- vimbin: nvim
vimtag: v0.8.2
- vimbin: nvim
vimtag: v0.8.1
- vimbin: nvim
vimtag: v0.8.0
- vimbin: nvim
vimtag: v0.7.2
- vimbin: nvim
vimtag: v0.7.0
- vimbin: nvim
vimtag: v0.6.1
- vimbin: nvim
vimtag: v0.6.0
- vimbin: nvim
vimtag: v0.5.1
- vimbin: nvim
vimtag: v0.5.0
- vimbin: nvim
vimtag: v0.4.4
- vimbin: nvim
vimtag: v0.4.3
- vimbin: nvim
vimtag: v0.4.2
- vimbin: nvim
vimtag: v0.4.0
- vimbin: nvim
vimtag: v0.3.8
runs-on: ubuntu-20.04
env:
VIM_BIN: ${{ matrix.vimbin }}
VIM_TAG: ${{ matrix.vimtag }}
DEPS: /home/runner/work/SpaceVim/deps
DISABLE_ES: ${{ matrix.disable_es }}
steps:
- name: Checkout
uses: actions/checkout@master
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install ninja-build gettext libtool libtool-bin autoconf automake cmake g++ pkg-config unzip curl lua5.2 liblua5.2-dev
- name: Install ${{ matrix.vimbin }} ${{ matrix.vimtag }}
run: |
.ci/install/linux.sh $VIM_BIN $VIM_TAG
- name: Run test
run: |
if [ "$VIM_BIN" = "nvim" ]; then
export PATH="${DEPS}/_neovim/${VIM_TAG}/bin:${PATH}"
export VIM="${DEPS}/_neovim/${VIM_TAG}/share/nvim/runtime"
export VIM_Es="--headless"
else
export PATH="${DEPS}/_vim/${VIM_TAG}/bin:${PATH}"
export VIM="${DEPS}/_vim/${VIM_TAG}/share/vim"
if [ "$DISABLE_ES" = "true" ]; then
export VIM_Es=""
else
export VIM_Es="-Es"
fi
fi
export PATH="/home/runner/.local/bin:${PATH}"
echo "\$PATH: \"${PATH}\""
echo "\$VIM: \"${VIM}\""
echo "================= ${VIM_BIN} version ======================"
$VIM_BIN --version
pip3 install --upgrade "pip < 21.0"
pip3 install covimerage virtualenv codecov
make test_coverage
covimerage -vv xml --omit 'build/*' --omit 'bundle/*'
codecov -X search gcov pycov -f coverage.xml
Windows:
strategy:
fail-fast: false
matrix:
include:
- vimbin: vim
vimtag: nightly
- vimbin: vim
vimtag: v7.4.1185
- vimbin: vim
vimtag: v7.4.1689
- vimbin: vim
vimtag: v8.0.0027
- vimbin: vim
vimtag: v8.0.1453
- vimbin: vim
vimtag: v8.1.2269
- vimbin: vim
vimtag: v8.2.2434
- vimbin: vim
vimtag: v8.2.3995
- vimbin: nvim
vimtag: nightly
- vimbin: nvim
vimtag: v0.9.1
- vimbin: nvim
vimtag: v0.9.0
- vimbin: nvim
vimtag: v0.8.3
- vimbin: nvim
vimtag: v0.8.2
- vimbin: nvim
vimtag: v0.8.1
- vimbin: nvim
vimtag: v0.8.0
- vimbin: nvim
vimtag: v0.7.2
- vimbin: nvim
vimtag: v0.7.0
- vimbin: nvim
vimtag: v0.6.1
- vimbin: nvim
vimtag: v0.6.0
- vimbin: nvim
vimtag: v0.5.1
- vimbin: nvim
vimtag: v0.5.0
- vimbin: nvim
vimtag: v0.4.4
- vimbin: nvim
vimtag: v0.4.3
- vimbin: nvim
vimtag: v0.4.2
- vimbin: nvim
vimtag: v0.3.8
runs-on: windows-latest
env:
VIM_BIN: ${{ matrix.vimbin }}
VIM_TAG: ${{ matrix.vimtag }}
DEPS: C:\deps
steps:
- name: Checkout
uses: actions/checkout@master
- name: Install ${{ matrix.vimbin }} ${{ matrix.vimtag }}
run: |
.ci/install/windows.ps1 $VIM_BIN $VIM_TAG
- name: Run test
run: |
if ($Env:VIM_BIN.StartsWith("nvim"))
{
if (Test-Path $env:DEPS\Neovim\bin ) {
$Env:PATH = $Env:DEPS + '\Neovim\bin\;' + $Env:PATH
$Env:VIM = $Env:DEPS + '\Neovim\share\nvim'
}else{
$Env:PATH = $Env:DEPS + '\nvim-win64\bin\;' + $Env:PATH
$Env:VIM = $Env:DEPS + '\nvim-win64\share\nvim'
}
$Env:VIM_Es = '--headless'
}
elseif ($Env:VIM_BIN.StartsWith("vim"))
{
$Env:PATH = $Env:DEPS + '\vim\vim82\;' + $Env:PATH
$Env:VIM = $Env:DEPS + '\vim'
}
echo $Env:PATH
echo $Env:VIM
make test

34
.github/workflows/docker.yml vendored Normal file
View File

@ -0,0 +1,34 @@
name: docker
on:
push:
branches:
- 'master'
jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: docker/Dockerfile
push: true
tags: spacevim/spacevim:latest

13
.github/workflows/lint.yml vendored Normal file
View File

@ -0,0 +1,13 @@
name: reviewdog
on: [pull_request]
jobs:
vint:
name: runner / vint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: vint
uses: reviewdog/action-vint@v1
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-review # Change reporter.

23
.github/workflows/remote.yml vendored Normal file
View File

@ -0,0 +1,23 @@
name: mirror
on: [push]
jobs:
check:
strategy:
fail-fast: false
matrix:
mirror: ["gitee", "coding", "gitlab"]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
with:
fetch-depth: 0
- name: Push to ${{ matrix.mirror }}
env:
BOTSECRET: ${{ secrets.BOTSECRET }}
BOTSECRET_GITHUB: ${{ secrets.BOTSECRET_GITHUB }}
CODINGBOTSECRET: ${{ secrets.CODINGBOTSECRET }}
run: .ci/update_mirror.sh ${{ matrix.mirror }}

View File

@ -1,25 +1,29 @@
# SpaceVim
<h1 align="center">
<a href="https://github.com/SpaceVim/SpaceVim#readme">
<img src="https://spacevim.org/logo.png" width="440" alt="SpaceVim"/>
</a>
</h1>
[![twitter](https://img.spacevim.org/twitter.svg)](https://twitter.com/SpaceVim)
[Quick Start Guide](https://spacevim.org/quick-start-guide/) \|
[FAQ](https://spacevim.org/faq/)
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.
[![build](https://img.shields.io/github/actions/workflow/status/SpaceVim/SpaceVim/check.yml?branch=master)](https://github.com/SpaceVim/SpaceVim/actions/workflows/check.yml?query=branch%3Amaster)
[![Codecov coverage](https://img.shields.io/codecov/c/github/SpaceVim/SpaceVim.svg)](https://codecov.io/gh/SpaceVim/SpaceVim)
[![GPLv3 License](https://img.shields.io/badge/license-GPLv3-blue.svg)](https://github.com/SpaceVim/SpaceVim/blob/master/LICENSE)
[![Docker Pulls](https://img.shields.io/docker/pulls/spacevim/spacevim)](https://hub.docker.com/r/spacevim/spacevim)
- [Quick start guide](https://spacevim.org/quick-start-guide/): installation, configuration, and learning resources for SpaceVim
- [Documentation](https://spacevim.org/documentation/): the primary official documentation of SpaceVim
- [Available layers](https://spacevim.org/layers/): a list of available layers which can be used in SpaceVim
SpaceVim is a (neo)vim configuration inspired by spacemacs.
## Community
## Features
- English: [https://spacevim.org/community/](https://spacevim.org/community/)
- Chinese: [https://spacevim.org/cn/community/](https://spacevim.org/cn/community/)
- **Modularization:** plugins and functions are organized in [layers](https://spacevim.org/layers/).
- **Compatible api:** a series of [compatible APIs](https://spacevim.org/api/) for Vim/Neovim.
- **Great documentation:** online [documentation](https://spacevim.org/documentation/) and `:h SpaceVim`.
- **Better experience:** [Use lua to implement core plugins](https://spacevim.org/use-lua-to-reimplement-core-plugins/)
- **Beautiful UI:** you'll love the awesome UI and its useful features.
- **Mnemonic key bindings:** key binding guide will be displayed automatically
- **Fast boot time:** Lazy-load 90% of plugins with [dein.vim](https://github.com/Shougo/dein.vim)
- **Lower the risk of RSI:** by heavily using the space bar instead of modifiers.
- **Consistent experience:** consistent experience between terminal and gui
## Development
- English: [https://spacevim.org/development/](https://spacevim.org/development/)
- Chinese: [https://spacevim.org/cn/development/](https://spacevim.org/cn/development/)
<!-- vim:set nowrap: -->

View File

@ -226,6 +226,15 @@ let g:spacevim_if_ruby = 1
" Enable/Disable list mode, by default it is disabled.
let g:spacevim_enable_list_mode = 0
""
" @section lazy_conf_timeout, options-lazy_conf_timeout
" @parentsection options
" set the waiting time of lazy loading config in milliseconds. This will be
" applied to load layer config, and lazy plugin, and end function of SpaceVim.
" default is 300 ms.
let g:spacevim_lazy_conf_timeout = 200
""
" @section relativenumber, options-relativenumber
" @parentsection options
@ -1764,7 +1773,7 @@ function! SpaceVim#end() abort
let g:_spacevim_mappings_space.B = {'name' : '+Global buffers'}
let &tabline = ' '
if has('timers')
call timer_start(300, function('s:lazy_end'))
call timer_start(g:spacevim_lazy_conf_timeout, function('s:lazy_end'))
else
call s:lazy_end()
endif

View File

@ -56,13 +56,13 @@ function! SpaceVim#layers#colorscheme#plugins() abort
\ ['nanotech/jellybeans.vim', { 'merged' : 0 }],
\ ['arcticicestudio/nord-vim', { 'merged' : 0 }],
\ ['icymind/NeoSolarized', { 'merged' : 0 }],
\ ['w0ng/vim-hybrid', { 'merged' : 0 }],
\ ['SpaceVim/vim-material', { 'merged' : 0}],
\ ['srcery-colors/srcery-vim', { 'merged' : 0}],
\ [ 'drewtempelmeyer/palenight.vim', {'merged': 0 }],
\ ]
call add(plugins, [g:_spacevim_root_dir . 'bundle/dracula', {'merged' : 0}])
call add(plugins, [g:_spacevim_root_dir . 'bundle/vim-one', {'merged' : 0}])
call add(plugins, [g:_spacevim_root_dir . 'bundle/vim-hybrid', {'merged' : 0}])
"
" TODO:
" \ ['mhartington/oceanic-next', { 'merged' : 0 }],

View File

@ -43,7 +43,7 @@ function! s:load_plugins() abort
endfor
endfor
if has('timers')
call timer_start(500, function('s:layer_config_timer'), {'repeat' : 1})
call timer_start(g:spacevim_lazy_conf_timeout, function('s:layer_config_timer'), {'repeat' : 1})
else
call s:layer_config_timer(0)
endif

110
bundle/vim-hybrid/README.md Normal file
View File

@ -0,0 +1,110 @@
# hybrid.vim
A dark colour scheme for Vim that combines the:
- Default palette from [Tomorrow-Night](https://github.com/chriskempson/vim-tomorrow-theme).
- Reduced contrast palette from [Codecademy](https://www.codecademy.com)'s
online editor.
- Syntax group highlighting scheme from [Jellybeans](https://github.com/nanotech/jellybeans.vim)
- Vimscript from [Solarized](https://github.com/altercation/vim-colors-solarized)
## Updates
- 05/01/2016: Replaced `let g:hybrid_use_Xresources = 1` in favour of __`let
g:hybrid_custom_term_colors = 1`__
- 05/01/2016: Added `let g:hybrid_reduced_contrast = 1`
## Requirements
- gVim 7.3+ on Linux, Mac and Windows.
- Vim 7.3+ on Linux and Mac, using a terminal that supports 256 colours.
## Installation
1. Copy colors/hybrid.vim to:
```
~/.vim/colors/hybrid.vim
```
or alternatively, use a plugin manger such as
[vim-plug](https://github.com/junegunn/vim-plug),
[NeoBundle](https://github.com/Shougo/neobundle.vim),
[Vundle](https://github.com/gmarik/Vundle.vim), or
[Pathogen](https://github.com/tpope/vim-pathogen).
2. Add to ~/.vimrc:
```vim
set background=dark
colorscheme hybrid
```
## Define custom terminal colours (recommended)
Due to the limited 256 palette, colours in Vim and gVim will still be slightly
different.
In order to have Vim use the same colours as gVim (the way this colour scheme
is intended) define the basic 16 colours in your terminal.
#### Linux users: rxvt-unicode, xterm
1. Add the default palette to ~/.Xresources:
https://gist.github.com/3278077
![palette](http://dl.dropbox.com/u/23813887/Xresources-palette.png)
or alternatively, add the reduced contrast palette to ~/.Xresources:
https://gist.github.com/w0ng/16e33902508b4a0350ae
![palette](https://www.dropbox.com/s/0ny88dmfw84kcma/Xresources-palette-low.png?dl=1)
2. Add to ~/.vimrc:
```vim
let g:hybrid_custom_term_colors = 1
let g:hybrid_reduced_contrast = 1 " Remove this line if using the default palette.
colorscheme hybrid
```
#### OSX users: iTerm
1. Import the default colour preset into iTerm:
https://raw.githubusercontent.com/w0ng/dotfiles/master/iterm2/hybrid.itermcolors
![iterm_palette](http://i.imgur.com/wSWCyen.png)
or alternatively, import the reduced contrast color preset into iTerm:
https://raw.githubusercontent.com/w0ng/dotfiles/master/iterm2/hybrid-reduced-contrast.itermcolors
![iterm_palette_reduced](https://www.dropbox.com/s/mrvr3ftkmym0fok/iterm_palette_reduced.png?dl=1)
2. Add to ~/.vimrc:
```vim
let g:hybrid_custom_term_colors = 1
let g:hybrid_reduced_contrast = 1 " Remove this line if using the default palette.
colorscheme hybrid
```
## Screenshots
### Default palette on Linux
![vim-help](http://dl.dropbox.com/u/23813887/vim-help.png)
![vim-python](http://dl.dropbox.com/u/23813887/vim-python.png)
![vim-markdown](http://dl.dropbox.com/u/23813887/vim-markdown.png)
![vim-diff](http://dl.dropbox.com/u/23813887/vim-diff.png)
![vim-spell](https://dl.dropboxusercontent.com/u/23813887/vim-spell.png)
### Reduced contrast palette on OSX
![vim-reduced1](https://www.dropbox.com/s/57mjs7rfzq1h128/vim-reduced1.png?dl=1)
![vim-reduced2](https://www.dropbox.com/s/l6nvcm91llfxwjx/vim-reduced2.png?dl=1)
![vim-reduced3](https://www.dropbox.com/s/838qoahio9klsz6/vim-reduced3.png?dl=1)

View File

@ -0,0 +1,453 @@
" File: hybrid.vim
" Maintainer: Andrew Wong (w0ng)
" URL: https://github.com/w0ng/vim-hybrid
" Modified: 27 Jan 2013 07:33 AM AEST
" License: MIT
" Description:"{{{
" ----------------------------------------------------------------------------
" The default RGB colour palette is taken from Tomorrow-Night.vim:
" https://github.com/chriskempson/vim-tomorrow-theme
"
" The reduced RGB colour palette is taken from Codecademy's online editor:
" https://www.codecademy.com/learn
"
" The syntax highlighting scheme is taken from jellybeans.vim:
" https://github.com/nanotech/jellybeans.vim
"
" The is code taken from solarized.vim:
" https://github.com/altercation/vim-colors-solarized
"}}}
" Requirements And Recommendations:"{{{
" ----------------------------------------------------------------------------
" Requirements
" - gVim 7.3+ on Linux, Mac and Windows.
" - Vim 7.3+ on Linux and Mac, using a terminal that supports 256 colours.
"
" Due to the limited 256 palette, colours in Vim and gVim will still be slightly
" different.
"
" In order to have Vim use the same colours as gVim (the way this colour scheme
" is intended), it is recommended that you define the basic 16 colours in your
" terminal.
"
" For Linux users (rxvt-unicode, xterm):
"
" 1. Add the default palette to ~/.Xresources:
"
" https://gist.github.com/3278077
"
" or alternatively, add the reduced contrast palette to ~/.Xresources:
"
" https://gist.github.com/w0ng/16e33902508b4a0350ae
"
" 2. Add to ~/.vimrc:
"
" let g:hybrid_custom_term_colors = 1
" let g:hybrid_reduced_contrast = 1 " Remove this line if using the default palette.
" colorscheme hybrid
"
" For OSX users (iTerm):
"
" 1. Import the default colour preset into iTerm:
"
" https://raw.githubusercontent.com/w0ng/dotfiles/master/iterm2/hybrid.itermcolors
"
" or alternatively, import the reduced contrast color preset into iTerm:
"
" https://raw.githubusercontent.com/w0ng/dotfiles/master/iterm2/hybrid-reduced-contrast.itermcolors
"
" 2. Add to ~/.vimrc:
"
" let g:hybrid_custom_term_colors = 1
" let g:hybrid_reduced_contrast = 1 " Remove this line if using the default palette.
" colorscheme hybrid
"}}}
" Initialisation:"{{{
" ----------------------------------------------------------------------------
hi clear
if exists("syntax_on")
syntax reset
endif
let s:style = &background
let g:colors_name = "hybrid"
"}}}
" GUI And Cterm Palettes:"{{{
" ----------------------------------------------------------------------------
let s:palette = {'gui' : {} , 'cterm' : {}}
if exists("g:hybrid_reduced_contrast") && g:hybrid_reduced_contrast == 1
let s:gui_background = "#232c31"
let s:gui_selection = "#425059"
let s:gui_line = "#2d3c46"
let s:gui_comment = "#6c7a80"
else
let s:gui_background = "#1d1f21"
let s:gui_selection = "#373b41"
let s:gui_line = "#282a2e"
let s:gui_comment = "#707880"
endif
let s:palette.gui.background = { 'dark' : s:gui_background , 'light' : "#e4e4e4" }
let s:palette.gui.foreground = { 'dark' : "#c5c8c6" , 'light' : "#000000" }
let s:palette.gui.selection = { 'dark' : s:gui_selection , 'light' : "#bcbcbc" }
let s:palette.gui.line = { 'dark' : s:gui_line , 'light' : "#d0d0d0" }
let s:palette.gui.comment = { 'dark' : s:gui_comment , 'light' : "#5f5f5f" }
let s:palette.gui.red = { 'dark' : "#cc6666" , 'light' : "#5f0000" }
let s:palette.gui.orange = { 'dark' : "#de935f" , 'light' : "#875f00" }
let s:palette.gui.yellow = { 'dark' : "#f0c674" , 'light' : "#5f5f00" }
let s:palette.gui.green = { 'dark' : "#b5bd68" , 'light' : "#005f00" }
let s:palette.gui.aqua = { 'dark' : "#8abeb7" , 'light' : "#005f5f" }
let s:palette.gui.blue = { 'dark' : "#81a2be" , 'light' : "#00005f" }
let s:palette.gui.purple = { 'dark' : "#b294bb" , 'light' : "#5f005f" }
let s:palette.gui.window = { 'dark' : "#303030" , 'light' : "#9e9e9e" }
let s:palette.gui.darkcolumn = { 'dark' : "#1c1c1c" , 'light' : "#808080" }
let s:palette.gui.addbg = { 'dark' : "#5F875F" , 'light' : "#d7ffd7" }
let s:palette.gui.addfg = { 'dark' : "#d7ffaf" , 'light' : "#005f00" }
let s:palette.gui.changebg = { 'dark' : "#5F5F87" , 'light' : "#d7d7ff" }
let s:palette.gui.changefg = { 'dark' : "#d7d7ff" , 'light' : "#5f005f" }
let s:palette.gui.delbg = { 'dark' : "#cc6666" , 'light' : "#ffd7d7" }
let s:palette.gui.darkblue = { 'dark' : "#00005f" , 'light' : "#d7ffd7" }
let s:palette.gui.darkcyan = { 'dark' : "#005f5f" , 'light' : "#005f00" }
let s:palette.gui.darkred = { 'dark' : "#5f0000" , 'light' : "#d7d7ff" }
let s:palette.gui.darkpurple = { 'dark' : "#5f005f" , 'light' : "#5f005f" }
if exists("g:hybrid_custom_term_colors") && g:hybrid_custom_term_colors == 1
let s:cterm_foreground = "15" " White
let s:cterm_selection = "8" " DarkGrey
let s:cterm_line = "0" " Black
let s:cterm_comment = "7" " LightGrey
let s:cterm_red = "9" " LightRed
let s:cterm_orange = "3" " DarkYellow
let s:cterm_yellow = "11" " LightYellow
let s:cterm_green = "10" " LightGreen
let s:cterm_aqua = "14" " LightCyan
let s:cterm_blue = "12" " LightBlue
let s:cterm_purple = "13" " LightMagenta
let s:cterm_delbg = "9" " LightRed
else
let s:cterm_foreground = "250"
let s:cterm_selection = "237"
let s:cterm_line = "235"
let s:cterm_comment = "243"
let s:cterm_red = "167"
let s:cterm_orange = "173"
let s:cterm_yellow = "221"
let s:cterm_green = "143"
let s:cterm_aqua = "109"
let s:cterm_blue = "110"
let s:cterm_purple = "139"
let s:cterm_delbg = "167"
endif
let s:palette.cterm.background = { 'dark' : "234" , 'light' : "254" }
let s:palette.cterm.foreground = { 'dark' : s:cterm_foreground , 'light' : "16" }
let s:palette.cterm.window = { 'dark' : "236" , 'light' : "247" }
let s:palette.cterm.selection = { 'dark' : s:cterm_selection , 'light' : "250" }
let s:palette.cterm.line = { 'dark' : s:cterm_line , 'light' : "252" }
let s:palette.cterm.comment = { 'dark' : s:cterm_comment , 'light' : "59" }
let s:palette.cterm.red = { 'dark' : s:cterm_red , 'light' : "52" }
let s:palette.cterm.orange = { 'dark' : s:cterm_orange , 'light' : "94" }
let s:palette.cterm.yellow = { 'dark' : s:cterm_yellow , 'light' : "58" }
let s:palette.cterm.green = { 'dark' : s:cterm_green , 'light' : "22" }
let s:palette.cterm.aqua = { 'dark' : s:cterm_aqua , 'light' : "23" }
let s:palette.cterm.blue = { 'dark' : s:cterm_blue , 'light' : "17" }
let s:palette.cterm.purple = { 'dark' : s:cterm_purple , 'light' : "53" }
let s:palette.cterm.darkcolumn = { 'dark' : "234" , 'light' : "244" }
let s:palette.cterm.addbg = { 'dark' : "65" , 'light' : "194" }
let s:palette.cterm.addfg = { 'dark' : "193" , 'light' : "22" }
let s:palette.cterm.changebg = { 'dark' : "60" , 'light' : "189" }
let s:palette.cterm.changefg = { 'dark' : "189" , 'light' : "53" }
let s:palette.cterm.delbg = { 'dark' : s:cterm_delbg , 'light' : "224" }
let s:palette.cterm.darkblue = { 'dark' : "17" , 'light' : "194" }
let s:palette.cterm.darkcyan = { 'dark' : "24" , 'light' : "22" }
let s:palette.cterm.darkred = { 'dark' : "52" , 'light' : "189" }
let s:palette.cterm.darkpurple = { 'dark' : "53" , 'light' : "53" }
"}}}
" Formatting Options:"{{{
" ----------------------------------------------------------------------------
let s:none = "NONE"
let s:t_none = "NONE"
let s:n = "NONE"
let s:c = ",undercurl"
let s:r = ",reverse"
let s:s = ",standout"
let s:b = ",bold"
let s:u = ",underline"
let s:i = ",italic"
"}}}
" Highlighting Primitives:"{{{
" ----------------------------------------------------------------------------
function! s:build_prim(hi_elem, field)
" Given a:hi_elem = bg, a:field = comment
let l:vname = "s:" . a:hi_elem . "_" . a:field " s:bg_comment
let l:gui_assign = "gui".a:hi_elem."=".s:palette.gui[a:field][s:style] " guibg=...
let l:cterm_assign = "cterm".a:hi_elem."=".s:palette.cterm[a:field][s:style] " ctermbg=...
exe "let " . l:vname . " = ' " . l:gui_assign . " " . l:cterm_assign . "'"
endfunction
let s:bg_none = ' guibg=NONE ctermbg=NONE'
call s:build_prim('bg', 'foreground')
call s:build_prim('bg', 'background')
call s:build_prim('bg', 'selection')
call s:build_prim('bg', 'line')
call s:build_prim('bg', 'comment')
call s:build_prim('bg', 'red')
call s:build_prim('bg', 'orange')
call s:build_prim('bg', 'yellow')
call s:build_prim('bg', 'green')
call s:build_prim('bg', 'aqua')
call s:build_prim('bg', 'blue')
call s:build_prim('bg', 'purple')
call s:build_prim('bg', 'window')
call s:build_prim('bg', 'darkcolumn')
call s:build_prim('bg', 'addbg')
call s:build_prim('bg', 'addfg')
call s:build_prim('bg', 'changebg')
call s:build_prim('bg', 'changefg')
call s:build_prim('bg', 'delbg')
call s:build_prim('bg', 'darkblue')
call s:build_prim('bg', 'darkcyan')
call s:build_prim('bg', 'darkred')
call s:build_prim('bg', 'darkpurple')
let s:fg_none = ' guifg=NONE ctermfg=NONE'
call s:build_prim('fg', 'foreground')
call s:build_prim('fg', 'background')
call s:build_prim('fg', 'selection')
call s:build_prim('fg', 'line')
call s:build_prim('fg', 'comment')
call s:build_prim('fg', 'red')
call s:build_prim('fg', 'orange')
call s:build_prim('fg', 'yellow')
call s:build_prim('fg', 'green')
call s:build_prim('fg', 'aqua')
call s:build_prim('fg', 'blue')
call s:build_prim('fg', 'purple')
call s:build_prim('fg', 'window')
call s:build_prim('fg', 'darkcolumn')
call s:build_prim('fg', 'addbg')
call s:build_prim('fg', 'addfg')
call s:build_prim('fg', 'changebg')
call s:build_prim('fg', 'changefg')
call s:build_prim('fg', 'darkblue')
call s:build_prim('fg', 'darkcyan')
call s:build_prim('fg', 'darkred')
call s:build_prim('fg', 'darkpurple')
exe "let s:fmt_none = ' gui=NONE". " cterm=NONE". " term=NONE" ."'"
exe "let s:fmt_bold = ' gui=NONE".s:b. " cterm=NONE".s:b. " term=NONE".s:b ."'"
exe "let s:fmt_bldi = ' gui=NONE".s:b. " cterm=NONE".s:b. " term=NONE".s:b ."'"
exe "let s:fmt_undr = ' gui=NONE".s:u. " cterm=NONE".s:u. " term=NONE".s:u ."'"
exe "let s:fmt_undb = ' gui=NONE".s:u.s:b. " cterm=NONE".s:u.s:b. " term=NONE".s:u.s:b."'"
exe "let s:fmt_undi = ' gui=NONE".s:u. " cterm=NONE".s:u. " term=NONE".s:u ."'"
exe "let s:fmt_curl = ' gui=NONE".s:c. " cterm=NONE".s:c. " term=NONE".s:c ."'"
exe "let s:fmt_ital = ' gui=NONE".s:i. " cterm=NONE".s:i. " term=NONE".s:i ."'"
exe "let s:fmt_stnd = ' gui=NONE".s:s. " cterm=NONE".s:s. " term=NONE".s:s ."'"
exe "let s:fmt_revr = ' gui=NONE".s:r. " cterm=NONE".s:r. " term=NONE".s:r ."'"
exe "let s:fmt_revb = ' gui=NONE".s:r.s:b. " cterm=NONE".s:r.s:b. " term=NONE".s:r.s:b."'"
exe "let s:sp_none = ' guisp=". s:none ."'"
exe "let s:sp_foreground = ' guisp=". s:palette.gui.foreground[s:style] ."'"
exe "let s:sp_background = ' guisp=". s:palette.gui.background[s:style] ."'"
exe "let s:sp_selection = ' guisp=". s:palette.gui.selection[s:style] ."'"
exe "let s:sp_line = ' guisp=". s:palette.gui.line[s:style] ."'"
exe "let s:sp_comment = ' guisp=". s:palette.gui.comment[s:style] ."'"
exe "let s:sp_red = ' guisp=". s:palette.gui.red[s:style] ."'"
exe "let s:sp_orange = ' guisp=". s:palette.gui.orange[s:style] ."'"
exe "let s:sp_yellow = ' guisp=". s:palette.gui.yellow[s:style] ."'"
exe "let s:sp_green = ' guisp=". s:palette.gui.green[s:style] ."'"
exe "let s:sp_aqua = ' guisp=". s:palette.gui.aqua[s:style] ."'"
exe "let s:sp_blue = ' guisp=". s:palette.gui.blue[s:style] ."'"
exe "let s:sp_purple = ' guisp=". s:palette.gui.purple[s:style] ."'"
exe "let s:sp_window = ' guisp=". s:palette.gui.window[s:style] ."'"
exe "let s:sp_addbg = ' guisp=". s:palette.gui.addbg[s:style] ."'"
exe "let s:sp_addfg = ' guisp=". s:palette.gui.addfg[s:style] ."'"
exe "let s:sp_changebg = ' guisp=". s:palette.gui.changebg[s:style] ."'"
exe "let s:sp_changefg = ' guisp=". s:palette.gui.changefg[s:style] ."'"
exe "let s:sp_darkblue = ' guisp=". s:palette.gui.darkblue[s:style] ."'"
exe "let s:sp_darkcyan = ' guisp=". s:palette.gui.darkcyan[s:style] ."'"
exe "let s:sp_darkred = ' guisp=". s:palette.gui.darkred[s:style] ."'"
exe "let s:sp_darkpurple = ' guisp=". s:palette.gui.darkpurple[s:style] ."'"
"}}}
" Vim Highlighting: (see :help highlight-groups)"{{{
" ----------------------------------------------------------------------------
exe "hi! ColorColumn" .s:fg_none .s:bg_line .s:fmt_none
" Conceal"
" Cursor"
" CursorIM"
exe "hi! CursorColumn" .s:fg_none .s:bg_line .s:fmt_none
exe "hi! CursorLine" .s:fg_none .s:bg_line .s:fmt_none
exe "hi! Directory" .s:fg_blue .s:bg_none .s:fmt_none
exe "hi! DiffAdd" .s:fg_addfg .s:bg_addbg .s:fmt_none
exe "hi! DiffChange" .s:fg_changefg .s:bg_changebg .s:fmt_none
exe "hi! DiffDelete" .s:fg_background .s:bg_delbg .s:fmt_none
exe "hi! DiffText" .s:fg_background .s:bg_blue .s:fmt_none
exe "hi! ErrorMsg" .s:fg_background .s:bg_red .s:fmt_stnd
exe "hi! VertSplit" .s:fg_window .s:bg_none .s:fmt_none
exe "hi! Folded" .s:fg_comment .s:bg_darkcolumn .s:fmt_none
exe "hi! FoldColumn" .s:fg_none .s:bg_darkcolumn .s:fmt_none
exe "hi! SignColumn" .s:fg_none .s:bg_darkcolumn .s:fmt_none
" Incsearch"
exe "hi! LineNr" .s:fg_selection .s:bg_none .s:fmt_none
exe "hi! CursorLineNr" .s:fg_yellow .s:bg_none .s:fmt_none
exe "hi! MatchParen" .s:fg_background .s:bg_changebg .s:fmt_none
exe "hi! ModeMsg" .s:fg_green .s:bg_none .s:fmt_none
exe "hi! MoreMsg" .s:fg_green .s:bg_none .s:fmt_none
exe "hi! NonText" .s:fg_selection .s:bg_none .s:fmt_none
exe "hi! Pmenu" .s:fg_foreground .s:bg_selection .s:fmt_none
exe "hi! PmenuSel" .s:fg_foreground .s:bg_selection .s:fmt_revr
" PmenuSbar"
" PmenuThumb"
exe "hi! Question" .s:fg_green .s:bg_none .s:fmt_none
exe "hi! Search" .s:fg_background .s:bg_yellow .s:fmt_none
exe "hi! SpecialKey" .s:fg_selection .s:bg_none .s:fmt_none
exe "hi! SpellCap" .s:fg_blue .s:bg_darkblue .s:fmt_undr
exe "hi! SpellLocal" .s:fg_aqua .s:bg_darkcyan .s:fmt_undr
exe "hi! SpellBad" .s:fg_red .s:bg_darkred .s:fmt_undr
exe "hi! SpellRare" .s:fg_purple .s:bg_darkpurple .s:fmt_undr
exe "hi! StatusLine" .s:fg_comment .s:bg_background .s:fmt_revr
exe "hi! StatusLineNC" .s:fg_window .s:bg_comment .s:fmt_revr
exe "hi! TabLine" .s:fg_foreground .s:bg_darkcolumn .s:fmt_revr
" TabLineFill"
" TabLineSel"
exe "hi! Title" .s:fg_yellow .s:bg_none .s:fmt_none
exe "hi! Visual" .s:fg_none .s:bg_selection .s:fmt_none
" VisualNos"
exe "hi! WarningMsg" .s:fg_red .s:bg_none .s:fmt_none
" FIXME LongLineWarning to use variables instead of hardcoding
hi LongLineWarning guifg=NONE guibg=#371F1C gui=underline ctermfg=NONE ctermbg=NONE cterm=underline
" WildMenu"
" Use defined custom background colour for terminal Vim.
if !has('gui_running') && exists("g:hybrid_custom_term_colors") && g:hybrid_custom_term_colors == 1
let s:bg_normal = s:bg_none
else
let s:bg_normal = s:bg_background
endif
exe "hi! Normal" .s:fg_foreground .s:bg_normal .s:fmt_none
"}}}
" Generic Syntax Highlighting: (see :help group-name)"{{{
" ----------------------------------------------------------------------------
exe "hi! Comment" .s:fg_comment .s:bg_none .s:fmt_none
exe "hi! Constant" .s:fg_red .s:bg_none .s:fmt_none
exe "hi! String" .s:fg_green .s:bg_none .s:fmt_none
" Character"
" Number"
" Boolean"
" Float"
exe "hi! Identifier" .s:fg_purple .s:bg_none .s:fmt_none
exe "hi! Function" .s:fg_yellow .s:bg_none .s:fmt_none
exe "hi! Statement" .s:fg_blue .s:bg_none .s:fmt_none
" Conditional"
" Repeat"
" Label"
exe "hi! Operator" .s:fg_aqua .s:bg_none .s:fmt_none
" Keyword"
" Exception"
exe "hi! PreProc" .s:fg_aqua .s:bg_none .s:fmt_none
" Include"
" Define"
" Macro"
" PreCondit"
exe "hi! Type" .s:fg_orange .s:bg_none .s:fmt_none
" StorageClass"
exe "hi! Structure" .s:fg_aqua .s:bg_none .s:fmt_none
" Typedef"
exe "hi! Special" .s:fg_green .s:bg_none .s:fmt_none
" SpecialChar"
" Tag"
" Delimiter"
" SpecialComment"
" Debug"
"
exe "hi! Underlined" .s:fg_blue .s:bg_none .s:fmt_none
exe "hi! Ignore" .s:fg_none .s:bg_none .s:fmt_none
exe "hi! Error" .s:fg_red .s:bg_darkred .s:fmt_undr
exe "hi! Todo" .s:fg_addfg .s:bg_none .s:fmt_none
" Quickfix window highlighting
exe "hi! qfLineNr" .s:fg_yellow .s:bg_none .s:fmt_none
" qfFileName"
" qfLineNr"
" qfError"
"}}}
" Diff Syntax Highlighting:"{{{
" ----------------------------------------------------------------------------
" Diff
" diffOldFile
" diffNewFile
" diffFile
" diffOnly
" diffIdentical
" diffDiffer
" diffBDiffer
" diffIsA
" diffNoEOL
" diffCommon
hi! link diffRemoved Constant
" diffChanged
hi! link diffAdded Special
" diffLine
" diffSubname
" diffComment
"}}}
"
" This is needed for some reason: {{{
let &background = s:style
" }}}
" Legal:"{{{
" ----------------------------------------------------------------------------
" Copyright (c) 2011 Ethan Schoonover
" Copyright (c) 2009-2012 NanoTech
" Copyright (c) 2012 w0ng
"
" Permission is hereby granted, free of charge, to any per
" son obtaining a copy of this software and associated doc
" umentation files (the “Software”), to deal in the Soft
" ware without restriction, including without limitation
" the rights to use, copy, modify, merge, publish, distrib
" ute, sublicense, and/or sell copies of the Software, and
" to permit persons to whom the Software is furnished to do
" so, subject to the following conditions:
"
" The above copyright notice and this permission notice
" shall be included in all copies or substantial portions
" of the Software.
"
" THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY
" KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
" THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICU
" LAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CON
" TRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON
" NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
" THE SOFTWARE.
" }}}

View File

@ -62,41 +62,42 @@ CONTENTS *SpaceVim-contents*
40. info_symbol............................ |SpaceVim-options-info_symbol|
41. keep_server_alive................ |SpaceVim-options-keep_server_alive|
42. language.................................. |SpaceVim-options-language|
43. leader_guide_theme.............. |SpaceVim-options-leader_guide_theme|
44. lint_engine............................ |SpaceVim-options-lint_engine|
45. lint_on_the_fly.................... |SpaceVim-options-lint_on_the_fly|
46. max_column.............................. |SpaceVim-options-max_column|
47. plugin_bundle_dir................ |SpaceVim-options-plugin_bundle_dir|
48. plugin_manager_processes.. |SpaceVim-options-plugin_manager_processes|
49. project_auto_root................ |SpaceVim-options-project_auto_root|
50. project_non_root.................. |SpaceVim-options-project_non_root|
51. project_rooter_outermost.. |SpaceVim-options-project_rooter_outermost|
52. project_rooter_patterns.... |SpaceVim-options-project_rooter_patterns|
53. projects_cache_num.............. |SpaceVim-options-projects_cache_num|
54. realtime_leader_guide........ |SpaceVim-options-realtime_leader_guide|
55. relativenumber...................... |SpaceVim-options-relativenumber|
56. retry_cnt................................ |SpaceVim-options-retry_cnt|
57. search_tools.......................... |SpaceVim-options-search_tools|
58. sidebar_width........................ |SpaceVim-options-sidebar_width|
59. snippet_engine...................... |SpaceVim-options-snippet_engine|
60. src_root.................................. |SpaceVim-options-src_root|
61. statusline_iseparator........ |SpaceVim-options-statusline_iseparator|
62. statusline_left.................... |SpaceVim-options-statusline_left|
63. statusline_right.................. |SpaceVim-options-statusline_right|
64. statusline_separator.......... |SpaceVim-options-statusline_separator|
65. statusline_unicode.............. |SpaceVim-options-statusline_unicode|
66. terminal_cursor_shape........ |SpaceVim-options-terminal_cursor_shape|
67. todo_close_list......................... |SpaceVim-options-close_list|
68. todo_labels............................ |SpaceVim-options-todo_labels|
69. todo_prefix............................ |SpaceVim-options-todo_prefix|
70. vim_help_language................ |SpaceVim-options-vim_help_language|
71. vimcompatible........................ |SpaceVim-options-vimcompatible|
72. warning_symbol...................... |SpaceVim-options-warning_symbol|
73. wildignore.............................. |SpaceVim-options-wildignore|
74. windisk_encoding.................. |SpaceVim-options-windisk_encoding|
75. windows_index_type.............. |SpaceVim-options-windows_index_type|
76. windows_leader...................... |SpaceVim-options-windows_leader|
77. windows_smartclose.............. |SpaceVim-options-windows_smartclose|
43. lazy_conf_timeout................ |SpaceVim-options-lazy_conf_timeout|
44. leader_guide_theme.............. |SpaceVim-options-leader_guide_theme|
45. lint_engine............................ |SpaceVim-options-lint_engine|
46. lint_on_the_fly.................... |SpaceVim-options-lint_on_the_fly|
47. max_column.............................. |SpaceVim-options-max_column|
48. plugin_bundle_dir................ |SpaceVim-options-plugin_bundle_dir|
49. plugin_manager_processes.. |SpaceVim-options-plugin_manager_processes|
50. project_auto_root................ |SpaceVim-options-project_auto_root|
51. project_non_root.................. |SpaceVim-options-project_non_root|
52. project_rooter_outermost.. |SpaceVim-options-project_rooter_outermost|
53. project_rooter_patterns.... |SpaceVim-options-project_rooter_patterns|
54. projects_cache_num.............. |SpaceVim-options-projects_cache_num|
55. realtime_leader_guide........ |SpaceVim-options-realtime_leader_guide|
56. relativenumber...................... |SpaceVim-options-relativenumber|
57. retry_cnt................................ |SpaceVim-options-retry_cnt|
58. search_tools.......................... |SpaceVim-options-search_tools|
59. sidebar_width........................ |SpaceVim-options-sidebar_width|
60. snippet_engine...................... |SpaceVim-options-snippet_engine|
61. src_root.................................. |SpaceVim-options-src_root|
62. statusline_iseparator........ |SpaceVim-options-statusline_iseparator|
63. statusline_left.................... |SpaceVim-options-statusline_left|
64. statusline_right.................. |SpaceVim-options-statusline_right|
65. statusline_separator.......... |SpaceVim-options-statusline_separator|
66. statusline_unicode.............. |SpaceVim-options-statusline_unicode|
67. terminal_cursor_shape........ |SpaceVim-options-terminal_cursor_shape|
68. todo_close_list......................... |SpaceVim-options-close_list|
69. todo_labels............................ |SpaceVim-options-todo_labels|
70. todo_prefix............................ |SpaceVim-options-todo_prefix|
71. vim_help_language................ |SpaceVim-options-vim_help_language|
72. vimcompatible........................ |SpaceVim-options-vimcompatible|
73. warning_symbol...................... |SpaceVim-options-warning_symbol|
74. wildignore.............................. |SpaceVim-options-wildignore|
75. windisk_encoding.................. |SpaceVim-options-windisk_encoding|
76. windows_index_type.............. |SpaceVim-options-windows_index_type|
77. windows_leader...................... |SpaceVim-options-windows_leader|
78. windows_smartclose.............. |SpaceVim-options-windows_smartclose|
3. Configuration............................................ |SpaceVim-config|
4. Commands............................................... |SpaceVim-commands|
5. Public functions...................................... |SpaceVim-functions|
@ -829,6 +830,13 @@ Set the message language of vim. Default is 'en_US.UTF-8'.
language = 'en_CA.utf8'
<
==============================================================================
LAZY_CONF_TIMEOUT *SpaceVim-options-lazy_conf_timeout*
set the waiting time of lazy loading config in milliseconds. This will be
applied to load layer config, and lazy plugin, and end function of SpaceVim.
default is 300 ms.
==============================================================================
LEADER_GUIDE_THEME *SpaceVim-options-leader_guide_theme*

41
docker/Dockerfile Normal file
View File

@ -0,0 +1,41 @@
FROM ubuntu:latest
MAINTAINER Shidong Wang <wsdjeg@outlook.com>
RUN apt update && \
apt install -y \
neovim \
curl \
python3-dev \
python3-pynvim \
lua5.3 \
git \
universal-ctags \
silversearcher-ag && \
apt clean
ENV HOME /home/spacevim
RUN groupdel users \
&& groupadd -r spacevim \
&& useradd --create-home --home-dir $HOME \
-r -g spacevim \
spacevim
USER spacevim
WORKDIR $HOME
ENV PYTHON3_HOST_PROG "/usr/bin/python3"
RUN mkdir -p $HOME/.config $HOME/.SpaceVim.d
RUN curl https://raw.githubusercontent.com/SpaceVim/SpaceVim/master/docker/init.toml > $HOME/.SpaceVim.d/init.toml
RUN curl -sLf https://spacevim.org/install.sh | bash
RUN nvim --headless +'call dein#install#_update([], "install", v:false)' +qall
RUN rm $HOME/.SpaceVim.d/init.toml
ENTRYPOINT nvim

13
docker/Makefile Normal file
View File

@ -0,0 +1,13 @@
HAVE_DOCKER := $(shell which docker 2>/dev/null)
HAVE_PODMAN := $(shell which podman 2>/dev/null)
build:
ifdef HAVE_DOCKER
docker build -t nvim -f Dockerfile .
else
ifdef HAVE_PODMAN
podman build -t nvim -f Dockerfile .
else
$(error "No docker or podman in $(PATH). Check if one was installed.")
endif
endif

43
docker/README.md Normal file
View File

@ -0,0 +1,43 @@
## SpaceVim in DockerHub
![Docker Automated build](https://img.shields.io/docker/automated/spacevim/spacevim)
![Docker Image Size (latest by date)](https://img.shields.io/docker/image-size/spacevim/spacevim?sort=date)
[![Docker Pulls](https://img.shields.io/docker/pulls/spacevim/spacevim)](https://hub.docker.com/r/spacevim/spacevim)
This Dockerfile builds neovim `HEAD` and installs the latest available version of SpaceVim. You might want to use this for several reasons:
- Have a consistent version of Neovim and SpaceVim as long as the machine supports Docker.
- Try SpaceVim without modifying your current Vim/Neovim configuration.
- Try the latest Neovim with SpaceVim.
- Try SpaceVim with a newer version of Python.
- Debug SpaceVim configurations. e.g. when posting a bug report if you can reproduce it in this container then there's a higher chance that it is a true bug and not just an issue with your machine.
### FAQ
Isn't Docker stateless? Won't I have to reinstall all plugins each time I launch the container?
- During the build we call `dein#install()` so all plugins are installed and frozen. Your custom configurations can be added as an additional build step using the Docker `COPY` command.
### Build
You can build using the supplied `Makefile`:
make build
or call the command manually using:
docker build -t nvim -f Dockerfile .
### Run
You can run the container using:
docker run -it nvim
but that isn't terribly useful since changes made inside the container won't be visible outside. More useful is mounting the current working directory inside the container:
docker run -it -v $(pwd):/home/spacevim/src nvim
Even better is an alias `dnvim` which will do this automatically:
alias dnvim='docker run -it -v $(pwd):/home/spacevim/src nvim'

232
docker/init.toml Normal file
View File

@ -0,0 +1,232 @@
#=============================================================================
# init.toml --- Docker config temp file
# Copyright (c) 2016-2023 Wang Shidong & Contributors
# Author: Wang Shidong < wsdjeg@outlook.com >
# URL: https://spacevim.org
#=============================================================================
# SpaceVim options {{{
[options]
# vimcompatible = true
# enable_language_specific_leader = false
# }}}
## -- SpaceVim layer list start
[[layers]]
name = "VersionControl"
[[layers]]
name = "autocomplete"
[[layers]]
name = "chat"
[[layers]]
name = "checkers"
[[layers]]
name = "chinese"
[[layers]]
name = "colorscheme"
[[layers]]
name = "core#banner"
[[layers]]
name = "core#statusline"
[[layers]]
name = "core#tabline"
[[layers]]
name = "core"
[[layers]]
name = "cscope"
[[layers]]
name = "ctrlp"
[[layers]]
name = "debug"
[[layers]]
name = "default"
[[layers]]
name = "denite"
[[layers]]
name = "edit"
[[layers]]
name = "floobits"
[[layers]]
name = "format"
[[layers]]
name = "fzf"
[[layers]]
name = "git"
[[layers]]
name = "github"
[[layers]]
name = "japanese"
[[layers]]
name = "lang#WebAssembly"
[[layers]]
name = "lang#agda"
[[layers]]
name = "lang#asciidoc"
[[layers]]
name = "lang#autohotkey"
[[layers]]
name = "lang#c"
[[layers]]
name = "lang#clojure"
[[layers]]
name = "lang#csharp"
[[layers]]
name = "lang#dart"
[[layers]]
name = "lang#dockerfile"
[[layers]]
name = "lang#elixir"
[[layers]]
name = "lang#elm"
[[layers]]
name = "lang#erlang"
[[layers]]
name = "lang#extra"
[[layers]]
name = "lang#fsharp"
[[layers]]
name = "lang#go"
[[layers]]
name = "lang#haskell"
[[layers]]
name = "lang#html"
[[layers]]
name = "lang#java"
[[layers]]
name = "lang#javascript"
[[layers]]
name = "lang#julia"
[[layers]]
name = "lang#kotlin"
[[layers]]
name = "lang#latex"
[[layers]]
name = "lang#lisp"
[[layers]]
name = "lang#lua"
[[layers]]
name = "lang#markdown"
[[layers]]
name = "lang#nim"
[[layers]]
name = "lang#ocaml"
[[layers]]
name = "lang#perl"
[[layers]]
name = "lang#php"
[[layers]]
name = "lang#plantuml"
[[layers]]
name = "lang#puppet"
[[layers]]
name = "lang#purescript"
[[layers]]
name = "lang#python"
[[layers]]
name = "lang#ruby"
[[layers]]
name = "lang#rust"
[[layers]]
name = "lang#scala"
[[layers]]
name = "lang#sh"
[[layers]]
name = "lang#swift"
[[layers]]
name = "lang#typescript"
[[layers]]
name = "lang#vim"
[[layers]]
name = "lang#vue"
[[layers]]
name = "lsp"
[[layers]]
name = "leaderf"
[[layers]]
name = "shell"
[[layers]]
name = "sudo"
[[layers]]
name = "tags"
[[layers]]
name = "tmux"
[[layers]]
name = "tools#dash"
[[layers]]
name = "tools"
[[layers]]
name = "ui"
## -- SpaceVim layer list end

View File

@ -64,7 +64,7 @@ call SpaceVim#begin()
call SpaceVim#custom#load()
if has('timers')
call timer_start(300, 'SpaceVim#default#keyBindings')
call timer_start(g:spacevim_lazy_conf_timeout, 'SpaceVim#default#keyBindings')
else
call SpaceVim#default#keyBindings()
endif

88
log.txt Normal file
View File

@ -0,0 +1,88 @@
--- Startup times for process: Primary/TUI ---
times in msec
clock self+sourced self: sourced script
clock elapsed: other lines
000.003 000.003: --- NVIM STARTING ---
000.049 000.046: event init
000.129 000.080: early init
016.058 015.929: locale set
016.094 000.036: init first window
016.622 000.528: inits 1
016.697 000.075: window checked
016.707 000.010: parsing arguments
017.588 000.288 000.288: require('vim.shared')
018.093 000.169 000.169: require('vim.inspect')
018.390 000.282 000.282: require('vim._options')
018.394 000.799 000.348: require('vim._editor')
018.397 001.187 000.100: require('vim._init_packages')
018.405 000.511: init lua interpreter
022.946 004.542: --- NVIM STARTED ---
--- Startup times for process: Embedded ---
times in msec
clock self+sourced self: sourced script
clock elapsed: other lines
000.003 000.003: --- NVIM STARTING ---
000.050 000.047: event init
000.151 000.101: early init
016.239 016.088: locale set
016.274 000.035: init first window
016.709 000.435: inits 1
016.757 000.049: window checked
016.768 000.010: parsing arguments
017.664 000.282 000.282: require('vim.shared')
018.228 000.183 000.183: require('vim.inspect')
018.524 000.283 000.283: require('vim._options')
018.529 000.858 000.392: require('vim._editor')
018.532 001.241 000.101: require('vim._init_packages')
018.541 000.532: init lua interpreter
018.731 000.190: expanding arguments
018.748 000.017: inits 2
019.224 000.476: init highlight
019.227 000.003: waiting for UI
019.284 000.057: done waiting for UI
019.287 000.004: clear screen
019.570 000.036 000.036: require('vim.keymap')
021.111 001.135 001.135: require('vim.termcap')
021.311 000.170 000.170: require('vim.text')
034.937 015.646 014.306: require('vim._defaults')
034.944 000.011: init default mappings & autocommands
035.445 000.078 000.078: sourcing D:\Scoop\apps\neovim\current\share\nvim\runtime\ftplugin.vim
035.952 000.053 000.053: sourcing D:\Scoop\apps\neovim\current\share\nvim\runtime\indent.vim
036.025 000.949: sourcing vimrc file(s)
036.672 000.267 000.267: sourcing D:\Scoop\apps\neovim\current\share\nvim\runtime\filetype.lua
037.926 000.094 000.094: sourcing D:\Scoop\apps\neovim\current\share\nvim\runtime\syntax\synload.vim
039.693 002.300 002.205: sourcing D:\Scoop\apps\neovim\current\share/nvim/runtime/syntax/syntax.vim
045.907 000.297 000.297: sourcing D:\Scoop\apps\neovim\current\share\nvim\runtime\plugin\gzip.vim
056.088 000.423 000.423: sourcing D:\Scoop\apps\neovim\current\share\nvim\runtime\pack\dist\opt\matchit\plugin\matchit.vim
056.232 010.027 009.603: sourcing D:\Scoop\apps\neovim\current\share\nvim\runtime\plugin\matchit.vim
056.704 000.181 000.181: sourcing D:\Scoop\apps\neovim\current\share\nvim\runtime\plugin\matchparen.vim
057.452 000.444 000.444: sourcing D:\Scoop\apps\neovim\current\share\nvim\runtime\plugin\netrwPlugin.vim
057.867 000.074 000.074: sourcing D:\Scoop\apps\neovim\current\share\nvim\runtime\plugin\rplugin.vim
058.277 000.097 000.097: sourcing D:\Scoop\apps\neovim\current\share\nvim\runtime\plugin\shada.vim
058.631 000.045 000.045: sourcing D:\Scoop\apps\neovim\current\share\nvim\runtime\plugin\spellfile.vim
059.074 000.139 000.139: sourcing D:\Scoop\apps\neovim\current\share\nvim\runtime\plugin\tarPlugin.vim
059.424 000.043 000.043: sourcing D:\Scoop\apps\neovim\current\share\nvim\runtime\plugin\tutor.vim
059.890 000.161 000.161: sourcing D:\Scoop\apps\neovim\current\share\nvim\runtime\plugin\zipPlugin.vim
060.321 000.130 000.130: sourcing D:\Scoop\apps\neovim\current\share\nvim\runtime\plugin\editorconfig.lua
060.792 000.155 000.155: sourcing D:\Scoop\apps\neovim\current\share\nvim\runtime\plugin\man.lua
061.218 000.132 000.132: sourcing D:\Scoop\apps\neovim\current\share\nvim\runtime\plugin\osc52.lua
061.620 000.108 000.108: sourcing D:\Scoop\apps\neovim\current\share\nvim\runtime\plugin\tohtml.lua
061.717 011.093: loading rtp plugins
062.019 000.302: loading packages
062.828 000.809: loading after plugins
062.858 000.029: inits 3
062.861 000.003: reading ShaDa
063.105 000.245: opening buffers
063.240 000.135: BufEnter autocommands
063.243 000.003: editing files in windows
063.480 000.237: VimEnter autocommands
063.485 000.005: UIEnter autocommands
064.508 001.023: before starting main loop
065.178 000.670: first screen update
065.181 000.004: --- NVIM STARTED ---

View File

@ -328,7 +328,7 @@ function M.enable()
end
end
local tabline_augroup = vim.api.nvim_create_augroup('spacevim_tabline', { clear = true })
vim.api.nvim_create_autocmd({ 'BufNewFile', 'BufReadPost', 'BufNew' }, {
vim.api.nvim_create_autocmd({ 'BufNewFile', 'BufReadPost', 'BufAdd' }, {
callback = vim.schedule_wrap(function(event)
if
vim.api.nvim_buf_is_valid(event.buf)