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

Merge branch 'master' into feature/python-docstring

This commit is contained in:
Wang Shidong 2018-01-20 06:06:32 -06:00 committed by GitHub
commit 60a55965d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
22 changed files with 231 additions and 99 deletions

View File

@ -1,5 +1,3 @@
let s:url = ''
let s:api = '/api/site_admin'

View File

@ -7,7 +7,7 @@ function! SpaceVim#dev#releases#open() abort
let is_dev = g:spacevim_version =~ 'dev'
let releases = {
\ 'tag_name': (is_dev ? 'nightly' : g:spacevim_version),
\ 'target_commitish': 'dev',
\ 'target_commitish': 'master',
\ 'name': (is_dev ? 'nightly' : 'SpaceVim v' . g:spacevim_version),
\ 'body': (is_dev ? s:body() : SpaceVim#dev#releases#content()),
\ 'draft': v:false,

View File

@ -10,7 +10,7 @@ elif [ "$LINT" = "vimlint-errors" ]; then
if [[ -f build_log ]]; then
rm build_log
fi
for file in $(git diff --name-only HEAD dev | grep .vim$);
for file in $(git diff --name-only HEAD master | grep .vim$);
do
/tmp/vimlint/bin/vimlint.sh -E -l /tmp/vimlint -p /tmp/vimlparser $file >> build_log 2>&1;
done

View File

@ -7,9 +7,9 @@
[Gitter **Chat**](https://gitter.im/SpaceVim/SpaceVim) \|
[中文文档](http://spacevim.org/README_zh_cn/)
[![Build Status](https://travis-ci.org/SpaceVim/SpaceVim.svg?branch=dev)](https://travis-ci.org/SpaceVim/SpaceVim)
[![Build status](https://ci.appveyor.com/api/projects/status/eh3t5oph70abp665/branch/dev?svg=true)](https://ci.appveyor.com/project/wsdjeg/spacevim/branch/dev)
[![codecov](https://codecov.io/gh/SpaceVim/SpaceVim/branch/dev/graph/badge.svg)](https://codecov.io/gh/SpaceVim/SpaceVim/branch/dev)
[![Build Status](https://travis-ci.org/SpaceVim/SpaceVim.svg?branch=master)](https://travis-ci.org/SpaceVim/SpaceVim)
[![Build status](https://ci.appveyor.com/api/projects/status/eh3t5oph70abp665/branch/master?svg=true)](https://ci.appveyor.com/project/wsdjeg/spacevim/branch/master)
[![codecov](https://codecov.io/gh/SpaceVim/SpaceVim/branch/master/graph/badge.svg)](https://codecov.io/gh/SpaceVim/SpaceVim/branch/master)
![Version](https://img.shields.io/badge/version-0.7.0--dev-FF00CC.svg)
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
[![Doc](https://img.shields.io/badge/doc-%3Ah%20SpaceVim-orange.svg)](doc/SpaceVim.txt)

View File

@ -195,11 +195,18 @@ let g:spacevim_statusline_inactive_separator = 'arrow'
" \ 'version control info'
" \ ]
" <
let g:spacevim_statusline_left_sections = ['winnr', 'filename', 'major mode', 'syntax checking', 'minor mode lighters', 'version control info', 'hunks']
let g:spacevim_statusline_left_sections = ['winnr', 'filename', 'major mode',
\ 'syntax checking', 'minor mode lighters',
\ 'version control info', 'hunks']
""
" Define the right section of statusline in active windows. By default:
" >
" let g:spacevim_statusline_right_sections = ['fileformat', 'cursorpos']
" g:spacevim_statusline_right_sections =
" \ [
" \ 'fileformat',
" \ 'cursorpos',
" \ 'percentage'
" \ ]
" <
let g:spacevim_statusline_right_sections = ['fileformat', 'cursorpos', 'percentage']

View File

@ -18,7 +18,6 @@ function! SpaceVim#autocmds#init() abort
autocmd FileType jsp call JspFileTypeInit()
autocmd QuitPre * call SpaceVim#plugins#windowsmanager#UpdateRestoreWinInfo()
autocmd WinEnter * call SpaceVim#plugins#windowsmanager#MarkBaseWin()
autocmd FileType html,css,scss,sass,less,javascript,jsp,vue,eex EmmetInstall
autocmd BufRead,BufNewFile *.pp setfiletype puppet
if g:spacevim_enable_cursorline == 1
autocmd BufEnter,WinEnter,InsertLeave * setl cursorline

View File

@ -171,7 +171,7 @@ function! SpaceVim#layers#colorscheme#plugins() abort
\ ['romainl/Apprentice'],
\ ['icymind/NeoSolarized'],
\ ['jacoborus/tender'],
\ ['rakr/vim-one'],
\ ['wsdjeg/vim-one'],
\ ['arcticicestudio/nord-vim'],
\ ['KeitaNakamura/neodark.vim'],
\ ]

View File

@ -33,12 +33,6 @@ let s:i_separators = {
\ 'nil' : ['', ''],
\ }
let s:loaded_modes = []
if index(g:spacevim_plugin_groups, 'checkers') != -1
call add(s:loaded_modes, 'syntax-checking')
endif
if &cc ==# '80'
call add(s:loaded_modes, 'fill-column-indicator')
endif
let s:modes = {
\ 'center-cursor': {
\ 'icon' : '⊝',
@ -81,6 +75,15 @@ let s:loaded_sections_l = g:spacevim_statusline_left_sections
let [s:lsep , s:rsep] = get(s:separators, g:spacevim_statusline_separator, s:separators['arrow'])
let [s:ilsep , s:irsep] = get(s:i_separators, g:spacevim_statusline_inactive_separator, s:i_separators['arrow'])
if index(g:spacevim_plugin_groups, 'checkers') != -1
call add(s:loaded_modes, 'syntax-checking')
endif
if &cc ==# '80'
call add(s:loaded_modes, 'fill-column-indicator')
endif
if index(s:loaded_sections_r, 'whitespace')
call add(s:loaded_modes, 'whitespace')
endif
" build in sections for SpaceVim statusline
function! s:winnr(...) abort
if a:0 > 1

View File

@ -15,7 +15,6 @@ function! SpaceVim#layers#edit#plugins() abort
\ ['kana/vim-textobj-line'],
\ ['kana/vim-textobj-entire'],
\ ['scrooloose/nerdcommenter', { 'loadconf' : 1}],
\ ['mattn/emmet-vim', { 'on_cmd' : 'EmmetInstall'}],
\ ['gcmt/wildfire.vim',{'on_map' : '<Plug>(wildfire-'}],
\ ['easymotion/vim-easymotion'],
\ ['haya14busa/vim-easyoperator-line'],
@ -35,7 +34,6 @@ function! SpaceVim#layers#edit#config() abort
let g:multi_cursor_skip_key=get(g:, 'multi_cursor_skip_key', '<C-x>')
let g:multi_cursor_quit_key=get(g:, 'multi_cursor_quit_key', '<Esc>')
let g:user_emmet_install_global = 0
let g:user_emmet_leader_key=get(g:, 'user_emmet_leader_key', '<C-e>')
let g:user_emmet_mode='a'
let g:user_emmet_settings = {
\ 'javascript': {

View File

@ -1,11 +1,29 @@
function! SpaceVim#layers#lang#html#plugins() abort
let plugins = [
\ ['groenewege/vim-less', { 'on_ft' : ['less']}],
\ ['cakebaker/scss-syntax.vim', { 'on_ft' : ['scss','sass']}],
\ ['hail2u/vim-css3-syntax', { 'on_ft' : ['css','scss','sass']}],
\ ['ap/vim-css-color', { 'on_ft' : ['css','scss','sass','less','styl']}],
\ ['othree/html5.vim', { 'on_ft' : ['html']}],
\ ['wavded/vim-stylus', { 'on_ft' : ['stylus']}],
\ ]
return plugins
let plugins = [
\ ['groenewege/vim-less', { 'on_ft' : ['less']}],
\ ['cakebaker/scss-syntax.vim', { 'on_ft' : ['scss','sass']}],
\ ['hail2u/vim-css3-syntax', { 'on_ft' : ['css','scss','sass']}],
\ ['ap/vim-css-color', { 'on_ft' : ['css','scss','sass','less','styl']}],
\ ['othree/html5.vim', { 'on_ft' : ['html']}],
\ ['wavded/vim-stylus', { 'on_ft' : ['stylus']}],
\ ['mattn/emmet-vim', { 'on_cmd' : 'EmmetInstall'}],
\ ]
return plugins
endfunction
function! SpaceVim#layers#lang#html#config() abort
let g:user_emmet_leader_key=get(g:, 'user_emmet_leader_key', '<C-e>')
augroup spacevim_lang_html
autocmd!
autocmd FileType html,css,scss,sass,less,javascript,jsp,vue,eex call s:install_emmet()
augroup END
endfunction
function! s:install_emmet() abort
try
EmmetInstall
catch
endtry
endfunction

View File

@ -82,6 +82,7 @@ let s:lsp_servers = {
\ 'go' : ['go-langserver', '-mode', 'stdio'],
\ 'rust' : ['rustup', 'run', 'nightly', 'rls'],
\ 'python' : ['pyls'],
\ 'html' : ['html-languageserver', '--stdio'],
\ 'php' : ['php', g:spacevim_plugin_bundle_dir . 'repos/github.com/felixfbecker/php-language-server/bin/php-language-server.php']
\ }

View File

@ -310,7 +310,24 @@ function! s:highlight_cursor() abort
\ }
hi def link SpaceVimGuideCursor Cursor
call s:VIMH.hi(info)
let s:cursor_hi = matchaddpos('SpaceVimGuideCursor', [[line('.'), col('.'), 1]])
if s:vis == 'gv'
" [bufnum, lnum, col, off]
let begin = getpos("'<")
let end = getpos("'>")
if begin[1] == end[1]
let s:cursor_hi = matchaddpos('SpaceVimGuideCursor', [[begin[1], min([begin[2], end[2]]), abs(begin[2] - end[2]) + 1]])
else
let pos = [[begin[1], begin[2], len(getline(begin[1])) - begin[2] + 1],
\ [end[1], 1, end[2]],
\ ]
for lnum in range(begin[1] + 1, end[1] - 1)
call add(pos, [lnum, 1, len(getline(lnum))])
endfor
let s:cursor_hi = matchaddpos('SpaceVimGuideCursor', pos)
endif
else
let s:cursor_hi = matchaddpos('SpaceVimGuideCursor', [[line('.'), col('.'), 1]])
endif
endfunction
function! s:remove_cursor_highlight() abort

View File

@ -227,7 +227,12 @@ Define the left section of statusline in active windows. By default:
*g:spacevim_statusline_right_sections*
Define the right section of statusline in active windows. By default:
>
let g:spacevim_statusline_right_sections = ['fileformat', 'cursorpos']
g:spacevim_statusline_right_sections =
\ [
\ 'fileformat',
\ 'cursorpos',
\ 'percentage'
\ ]
<
*g:spacevim_statusline_unicode_symbols*

View File

@ -93,9 +93,10 @@
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-58a01d3aac22bd89"></script>
</body>
<root>
<p align="center">
<span class="credits right">Hosted on GitHub &mdash; Theme by <a href="https://twitter.com/michigangraham">mattgraham</a></span>
</p>
<p align="center">
<span class="credits right">Hosted on GitHub, <a href="https://github.com/SpaceVim/SpaceVim/edit/master/docs/{{ page.path }}">Help improve this page</a> &mdash; Theme by <a href="https://twitter.com/michigangraham">mattgraham</a>,
</span>
</p>
</root>
</html>

View File

@ -27,7 +27,7 @@ All of these channels are bridged together. Click on one of the badges below to
- [`SpaceVim/SpaceVim` on gitter](https://gitter.im/SpaceVim/SpaceVim)
- [`#spacevim` on FreeNode](https://webchat.freenode.net/?channels=spacevim)
- [`t.me/SpaceVim` on telegram](t.me/SpaceVim)
- [`t.me/SpaceVim` on telegram](https://t.me/SpaceVim)
- [`#spacevim:matrix.org` on Matrix](https://riot.im/app/#/room/%23spacevim:matrix.org)
- [`#spacevim` on slack](https://spacevim.slack.com/messages/C88CTJ62J)

View File

@ -1,7 +1,6 @@
---
title: "Conventions"
description: "conventions of contributing to SpaceVim, including the coding style guides about vim script and markdown"
permalink: "/conventions"
---
# Conventions

View File

@ -74,7 +74,7 @@ For files not belonging to Spacemacs like local packages and libraries, refer to
#### Conventions
SpaceVim is based on conventions, mainly for naming functions, keybindings definition and writing documentation. Please read the [conventions](https://spacevim.org/development/conventions) before your first contribution to get to know them.
SpaceVim is based on conventions, mainly for naming functions, keybindings definition and writing documentation. Please read the [conventions](https://spacevim.org/conventions/) before your first contribution to get to know them.
#### Pull Request
@ -86,7 +86,7 @@ PR = Pull-Request
##### Ideally for simple PRs (most of them):
- Branch from `dev`
- Branch from `master`
- One topic per PR
- One commit per PR
- If you have several commits on different topics, close the PR and create one PR per topic
@ -100,6 +100,7 @@ Those PRs are usually cherry-picked.
Squash only the commits with uninteresting changes like typos, syntax fixes, etc… and keep the important and isolated steps in different commits.
Those PRs are merged and explicitly not fast-forwarded.
Commit messages
Write commit messages according to adapted [Tim Popes guidelines](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html):

View File

@ -184,7 +184,7 @@ Community-driven configuration provides curated packages tuned by power users an
- **Lower the risk of RSI:** by heavily using the space bar instead of modifiers.
- **Batteries included:** discover hundreds of ready-to-use packages nicely
organised in configuration layers following a set of
[conventions](http://spacevim.org/development/).
[conventions](http://spacevim.org/conventions/).
- **Neovim centric:** Dark powered mode of SpaceVim
## Screenshots

View File

@ -1,60 +1,98 @@
@PowerShell -ExecutionPolicy Bypass -Command Invoke-Expression $('$args=@(^&{$args} %*);'+[String]::Join(';',(Get-Content '%~f0') -notmatch '^^@PowerShell.*EOF$')) & goto :EOF
echo " /###### /## /##/## "
echo " /##__ ## | ## | #|__/ "
echo " | ## \__/ /###### /###### /####### /######| ## | ##/##/######/#### "
echo " | ###### /##__ ##|____ ##/##_____//##__ #| ## / ##| #| ##_ ##_ ##"
echo " \____ #| ## \ ## /######| ## | ########\ ## ##/| #| ## \ ## \ ##"
echo " /## \ #| ## | ##/##__ #| ## | ##_____/ \ ###/ | #| ## | ## | ##"
echo " | ######| #######| ######| ######| ####### \ #/ | #| ## | ## | ##"
echo " \______/| ##____/ \_______/\_______/\_______/ \_/ |__|__/ |__/ |__/"
echo " | ## "
echo " | ## "
echo " |__/ "
echo " version : 0.7.0-dev by : spacevim.org "
Push-Location ~
$app_name = "SpaceVim"
$repo_url = "https://github.com/SpaceVim/SpaceVim.git"
$repo_name = "SpaceVim"
$repo_path = "$HOME\.SpaceVim"
if (!(Test-Path "$HOME\.SpaceVim")) {
echo "==> Trying to clone $app_name"
git clone $repo_url $repo_path
} else {
echo "==> Trying to update $app_name"
Push-Location $repo_path
git pull origin dev
}
echo ""
if (!(Test-Path "$HOME\vimfiles")) {
cmd /c mklink $HOME\vimfiles $repo_path
} else {
echo "[OK] vimfiles already exists"
}
echo ""
echo "Almost done!"
echo "=============================================================================="
echo "== Open GVim and it will install the plugins automatically =="
echo "=============================================================================="
echo ""
echo "That's it. Thanks for installing $app_name. Enjoy!"
echo ""
Function Pause ($Message = "Press any key to continue . . . ") {
if ((Test-Path variable:psISE) -and $psISE) {
$Shell = New-Object -ComObject "WScript.Shell"
$Button = $Shell.Popup("Click OK to continue.", 0, "Script Paused", 0)
} else {
Write-Host -NoNewline $Message
[void][System.Console]::ReadKey($true)
Write-Host
}
}
Pause
@PowerShell -ExecutionPolicy Bypass -Command Invoke-Expression $('$args=@(^&{$args} %*);'+[String]::Join(';',(Get-Content '%~f0') -notmatch '^^@PowerShell.*EOF$')) & goto :EOF
echo " /###### /## /##/## "
echo " /##__ ## | ## | #|__/ "
echo " | ## \__/ /###### /###### /####### /######| ## | ##/##/######/#### "
echo " | ###### /##__ ##|____ ##/##_____//##__ #| ## / ##| #| ##_ ##_ ##"
echo " \____ #| ## \ ## /######| ## | ########\ ## ##/| #| ## \ ## \ ##"
echo " /## \ #| ## | ##/##__ #| ## | ##_____/ \ ###/ | #| ## | ## | ##"
echo " | ######| #######| ######| ######| ####### \ #/ | #| ## | ## | ##"
echo " \______/| ##____/ \_______/\_______/\_______/ \_/ |__|__/ |__/ |__/"
echo " | ## "
echo " | ## "
echo " |__/ "
echo " version : 0.7.0-dev by : spacevim.org "
Push-Location ~
$app_name = "SpaceVim"
$repo_url = "https://github.com/SpaceVim/SpaceVim.git"
$repo_name = "SpaceVim"
$repo_path = "$HOME\.SpaceVim"
echo "==> Starting Testing Procedure..."
echo ""
sleep 1
echo "==> Testing git"
git version
if (!(echo $?)) {
echo "[ERROR] Please install git or make your PATH correctly set! "
echo ">>> Ready to Exit......"
Pause
exit
} else {
echo "[OK] Test successfully. Moving to next..."
sleep 1
}
echo ""
echo "==> Testing vim"
gvim --version
if (!(echo $?)) {
echo "[WARNING] You didn't install gvim or vim. But intallation can still continue..."
echo ""
echo "[WARNING] Please install gvim later or make your PATH correctly set! "
Pause
} else {
echo ($(vim --version) -split '\n')[0]
echo "[OK] Test successfully. Moving to next..."
sleep 1
}
echo "<== Testing Procedure Completed. Moving to next..."
sleep 1
echo ""
echo ""
if (!(Test-Path "$HOME\.SpaceVim")) {
echo "==> Trying to clone $app_name"
git clone $repo_url $repo_path
} else {
echo "==> Trying to update $app_name"
Push-Location $repo_path
git pull origin dev
}
echo ""
if (!(Test-Path "$HOME\vimfiles")) {
cmd /c mklink $HOME\vimfiles $repo_path
} else {
echo "[OK] vimfiles already exists"
sleep 1
}
echo ""
echo "Almost done!"
echo "=============================================================================="
echo "== Open GVim and it will install the plugins automatically =="
echo "=============================================================================="
echo ""
echo "That's it. Thanks for installing $app_name. Enjoy!"
echo ""
Function Pause ($Message = "Press any key to continue . . . ") {
if ((Test-Path variable:psISE) -and $psISE) {
$Shell = New-Object -ComObject "WScript.Shell"
$Button = $Shell.Popup("Click OK to continue.", 0, "Script Paused", 0)
} else {
Write-Host -NoNewline $Message
[void][System.Console]::ReadKey($true)
Write-Host
}
}
Pause

46
docs/layers/lang/html.md Normal file
View File

@ -0,0 +1,46 @@
---
title: "SpaceVim lang#html layer"
description: "Edit html in SpaceVim, with this layer, this layer provides code completion, syntax checking and code formatting for html."
---
# [SpaceVim Layers:](https://spacevim.org/layers) lang#html
<!-- vim-markdown-toc GFM -->
- [Description](#description)
- [Layer Installation](#layer-installation)
- [Language server](#language-server)
- [Features](#features)
- [Key bindings](#key-bindings)
<!-- vim-markdown-toc -->
## Description
This layer adds support for editing HTML and CSS.
## Layer Installation
To use this configuration layer, add `call SpaceVim#layers#load('lang#html')` to your custom configuration file.
### Language server
To install the language server, you need `npm` on your machine:
```bash
npm install --global vscode-html-languageserver-bin
```
## Features
- Generate HTML and CSS coding using [neosnippet](https://github.com/Shougo/neosnippet.vim/) and [emmet-vim](https://github.com/mattn/emmet-vim)
- Tags navigation on key % using matchit.vim
- auto-completion
- syntax checking
- language server protocol (need `lsp` layer)
## Key bindings
| key bindings | Description |
| ------------ | ------------ |
| `<C-e>` | emmet prefix |

View File

@ -91,6 +91,7 @@ default language server commands:
| `haskell` | `['hie', '--lsp']` |
| `c` | `['clangd']` |
| `cpp` | `['clangd']` |
| `html` | `['html-languageserver', '--stdio']` |
| `objc` | `['clangd']` |
| `objcpp` | `['clangd']` |
| `dart` | `['dart_language_server']` |

View File

@ -1 +1 @@
See the [Roadmap](https://spacevim.org/roadmap/) and [<kbd>:help SpaceVim-features</kbd>](https://spacevim.org/doc/user/vim_diff.html#nvim-features).
See the [Roadmap](https://spacevim.org/roadmap/) and <kbd>:help SpaceVim-features</kbd>.