mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-24 05:50:05 +08:00
Merge branch 'dev' into debug
This commit is contained in:
commit
0bd2347104
@ -22,7 +22,7 @@ function! SpaceVim#layers#git#config() abort
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['g', 'c'], 'Gina commit', 'edit git commit', 1)
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['g', 'p'], 'Gina push', 'git push', 1)
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['g', 'd'], 'Gina diff', 'view git diff', 1)
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['g', 'A'], 'Gina add .', 'state all files', 1)
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['g', 'A'], 'Gina add .', 'stage all files', 1)
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['g', 'b'], 'Gina blame', 'view git blame', 1)
|
||||
else
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['g', 's'], 'Gita status', 'git status', 1)
|
||||
@ -31,7 +31,7 @@ function! SpaceVim#layers#git#config() abort
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['g', 'c'], 'Gita commit', 'edit git commit', 1)
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['g', 'p'], 'Gita push', 'git push', 1)
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['g', 'd'], 'Gita diff', 'view git diff', 1)
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['g', 'A'], 'Gita add .', 'state all files', 1)
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['g', 'A'], 'Gita add .', 'stage all files', 1)
|
||||
call SpaceVim#mapping#space#def('nnoremap', ['g', 'b'], 'Gina blame', 'view git blame', 1)
|
||||
endif
|
||||
nmap <leader>hj <plug>(signify-next-hunk)
|
||||
|
@ -1,3 +1,15 @@
|
||||
""
|
||||
" @section lang#lua, layer-lang-lua
|
||||
" @parentsection layers
|
||||
" This layer includes utilities and language-specific mappings for lua development.
|
||||
"
|
||||
" @subsection Mappings
|
||||
" >
|
||||
" Mode Key Function
|
||||
" ---------------------------------------------
|
||||
" normal SPC l r lua run
|
||||
" <
|
||||
|
||||
function! SpaceVim#layers#lang#lua#plugins() abort
|
||||
let plugins = []
|
||||
" Improved Lua 5.3 syntax and indentation support for Vim
|
||||
@ -13,4 +25,14 @@ function! SpaceVim#layers#lang#lua#config() abort
|
||||
autocmd FileType lua setlocal omnifunc=luacomplete#complete
|
||||
augroup END
|
||||
endif
|
||||
|
||||
call SpaceVim#mapping#space#regesit_lang_mappings('lua', funcref('s:language_specified_mappings'))
|
||||
endfunction
|
||||
|
||||
" Add language specific mappings
|
||||
function! s:language_specified_mappings() abort
|
||||
|
||||
call SpaceVim#mapping#space#langSPC('nmap', ['l','r'],
|
||||
\ '<Plug>(Lua)',
|
||||
\ 'lua run', 0)
|
||||
endfunction
|
||||
|
@ -138,6 +138,7 @@ function! s:open_item() abort
|
||||
q
|
||||
exe 'e ' . filename
|
||||
exe linenr
|
||||
redraw!
|
||||
endif
|
||||
endfunction
|
||||
|
||||
|
@ -33,6 +33,7 @@ call SpaceVim#layers#load('shell',
|
||||
| [git](https://spacevim.org/layers/git/) | This layers adds extensive support for git |
|
||||
| [lang#c](https://spacevim.org/layers/lang/c/) | This layer is for c/c++/object-c development |
|
||||
| [lang#elixir](https://spacevim.org/layers/lang/elixir/) | This layer is for elixir development, provide autocompletion, syntax checking, code format for elixir file. |
|
||||
| [lang#go](https://spacevim.org/layers/lang/go/) | This layer is for go development |
|
||||
| [lang#java](https://spacevim.org/layers/lang/java/) | This layer is for Java development |
|
||||
| [lang#javascript](https://spacevim.org/layers/lang/javascript/) | This layer is for JaveScript development |
|
||||
| [lang#lisp](https://spacevim.org/layers/lang/lisp/) | for lisp development |
|
||||
|
45
docs/layers/lang/go.md
Normal file
45
docs/layers/lang/go.md
Normal file
@ -0,0 +1,45 @@
|
||||
---
|
||||
title: "SpaceVim golang layer"
|
||||
description: "This layer is for golang development. It also provides additional language-specific key mappings."
|
||||
---
|
||||
|
||||
# [SpaceVim Layers:](https://spacevim.org/layers) go
|
||||
|
||||
<!-- vim-markdown-toc GFM -->
|
||||
|
||||
- [Description](#description)
|
||||
- [Install](#install)
|
||||
- [Key bindings](#key-bindings)
|
||||
|
||||
<!-- vim-markdown-toc -->
|
||||
|
||||
## Description
|
||||
|
||||
This layer is for golang development. It also provides additional language-specific key mappings.
|
||||
|
||||
## Install
|
||||
|
||||
To use this configuration layer, add `SPLayer 'lang#go` to your custom configuration file.
|
||||
|
||||
## Key bindings
|
||||
|
||||
**Import key bindings:**
|
||||
|
||||
| Key Binding | Description |
|
||||
| ----------- | ---------------------------------------- |
|
||||
| SPC l i | go implements |
|
||||
| SPC l f | go info |
|
||||
| SPC l e | go rename |
|
||||
| SPC l r | go run |
|
||||
| SPC l b | go build |
|
||||
| SPC l t | go test |
|
||||
| SPC l d | go doc |
|
||||
| SPC l v | go doc vertical |
|
||||
| SPC l c | go coverage |
|
||||
|
||||
**Code formatting:**
|
||||
|
||||
the default key bindings for format current buffer is `SPC b f`, and this key bindings is defined in [format layer](<>). you can also use `g=` to indent current buffer.
|
||||
|
||||
To make neoformat support go files, you should have [go-fmt](http://golang.org/cmd/gofmt/) command available, or
|
||||
install [goimports](https://godoc.org/golang.org/x/tools/cmd/goimports). `go-fmt` is delivered by golang's default installation, so make sure you have correctly setup your go environment.
|
Loading…
Reference in New Issue
Block a user