mirror of
https://github.com/amix/vimrc
synced 2025-07-31 17:55:00 +08:00
Updated plugins
This commit is contained in:
1
sources_non_forked/vim-go/.gitignore
vendored
1
sources_non_forked/vim-go/.gitignore
vendored
@ -4,3 +4,4 @@ doc/tags
|
||||
# Test specific files
|
||||
FAILED
|
||||
test.log
|
||||
scripts/vim-vimhelplint
|
||||
|
@ -9,12 +9,15 @@ IMPROVEMENTS
|
||||
* `:GoBuild` now compiles the package with the `-i` flag added. This means that subsequent calls are much more faster due caching of packages [gh-1330]
|
||||
* `:GoCoverage` echos now the progress if `g:go_echo_command_info` is enabled [gh-1333]
|
||||
* Add `g:go_doc_max_height` setting to control the maximum height of the window created by `:GoDoc` and `K` mapping [gh-1335]
|
||||
* The `af` text object is able to include the assignment variable for anonymous functions. Can be disabled with `g:go_textobj_include_variable = 0` [gh-1345]
|
||||
|
||||
BUG FIXES:
|
||||
|
||||
* Fix obtaining package's import path for the current directory. This fixes some issues we had if the user was using multiple GOPATH's [gh-1321]
|
||||
* Fix documentation for vim-go & syntastic integration for errcheck using [gh-1323]
|
||||
* Fix showing an output if a test has finished when `:GoTest` is called [gh-1327]
|
||||
* Fix warning when goimports doesn't support srcdir [gh-1344]
|
||||
* Fix brokwn code folding with go_highlight_types [gh-1338]
|
||||
|
||||
## 1.13 - (June 6, 2017)
|
||||
|
||||
|
@ -184,7 +184,7 @@ function! s:fmt_cmd(bin_name, source, target)
|
||||
if !exists('b:goimports_vendor_compatible')
|
||||
let out = go#util#System(bin_path . " --help")
|
||||
if out !~ "-srcdir"
|
||||
call go#util#EchoWarning(printf("vim-go: goimports (%s) does not support srcdir. Update with: :GoUpdateBinaries", , bin_path))
|
||||
call go#util#EchoWarning(printf("vim-go: goimports (%s) does not support srcdir. Update with: :GoUpdateBinaries", bin_path))
|
||||
else
|
||||
let b:goimports_vendor_compatible = 1
|
||||
endif
|
||||
|
@ -6,6 +6,10 @@ if !exists("g:go_textobj_include_function_doc")
|
||||
let g:go_textobj_include_function_doc = 1
|
||||
endif
|
||||
|
||||
if !exists("g:go_textobj_include_variable")
|
||||
let g:go_textobj_include_variable = 1
|
||||
endif
|
||||
|
||||
" ( ) motions
|
||||
" { } motions
|
||||
" s for sentence
|
||||
@ -60,6 +64,16 @@ function! go#textobj#Function(mode) abort
|
||||
" want's to include doc comments for function declarations
|
||||
if has_key(info, 'doc') && g:go_textobj_include_function_doc
|
||||
call cursor(info.doc.line, info.doc.col)
|
||||
elseif info['sig']['name'] == '' && g:go_textobj_include_variable
|
||||
" one liner anonymous functions
|
||||
if info.lbrace.line == info.rbrace.line
|
||||
" jump to first nonblack char, to get the correct column
|
||||
call cursor(info.lbrace.line, 0 )
|
||||
normal! ^
|
||||
call cursor(info.func.line, col("."))
|
||||
else
|
||||
call cursor(info.func.line, info.rbrace.col)
|
||||
endif
|
||||
else
|
||||
call cursor(info.func.line, info.func.col)
|
||||
endif
|
||||
|
@ -690,8 +690,8 @@ CTRL-t
|
||||
:GoAddTags xml db
|
||||
<
|
||||
If [option] is passed it'll either add a new tag with an option or will
|
||||
modify existing tags. An example of adding `omitempty` to all `json` fields
|
||||
would be:
|
||||
modify existing tags. An example of adding `omitempty` to all `json`
|
||||
fields would be:
|
||||
>
|
||||
:GoAddTags json,omitempty
|
||||
<
|
||||
@ -981,6 +981,8 @@ af "a function", select contents from a function definition to the
|
||||
closing bracket. If |'g:go_textobj_include_function_doc'| is
|
||||
enabled it also includes the comment doc for a function
|
||||
declaration. This text-object also supports literal functions.
|
||||
If |'g:go_textobj_include_variable'| is enabled it also
|
||||
includes the variable of an function assignment
|
||||
|
||||
*go-v_if* *go-if*
|
||||
if "inside a function", select contents of a function,
|
||||
@ -1348,6 +1350,13 @@ Consider the comment above a function to be part of the function when using
|
||||
the `af` text object and `[[` motion. By default it's enabled. >
|
||||
|
||||
let g:go_textobj_include_function_doc = 1
|
||||
<
|
||||
*'g:go_textobj_include_variable'*
|
||||
|
||||
Consider the variable of an function assignment to be part of the anonymous
|
||||
function when using the `af` text object. By default it's enabled. >
|
||||
|
||||
let g:go_textobj_include_variable = 1
|
||||
<
|
||||
*'g:go_metalinter_autosave'*
|
||||
|
||||
|
@ -32,3 +32,14 @@ if [ -f "FAILED" ]; then
|
||||
exit 1
|
||||
fi
|
||||
echo 2>&1 "PASS"
|
||||
|
||||
# Run vimhelplint
|
||||
[ -d vim-vimhelplint ] || git clone https://github.com/machakann/vim-vimhelplint
|
||||
echo "Running vimhelplint"
|
||||
lint=$(vim -esN --cmd 'set rtp+=./vim-vimhelplint' -c 'filetype plugin on' \
|
||||
-c 'e ../doc/vim-go.txt' -c 'verb VimhelpLintEcho' -c q 2>&1)
|
||||
if [ -n "$lint" ]; then
|
||||
exit 1
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
|
@ -321,7 +321,7 @@ hi def link goField Identifier
|
||||
|
||||
" Structs & Interfaces;
|
||||
if g:go_highlight_types != 0
|
||||
syn match goTypeConstructor /\<\w\+{/he=e-1
|
||||
syn match goTypeConstructor /\<\w\+{\@=/he=e-1
|
||||
syn match goTypeDecl /\<type\>/ nextgroup=goTypeName skipwhite skipnl
|
||||
syn match goTypeName /\w\+/ contained nextgroup=goDeclType skipwhite skipnl
|
||||
syn match goDeclType /\<\(interface\|struct\)\>/ skipwhite skipnl
|
||||
|
Reference in New Issue
Block a user