mirror of
https://github.com/amix/vimrc
synced 2025-06-16 09:35:01 +08:00
Updated plugins
This commit is contained in:
@ -4,6 +4,6 @@ Thanks for improving vim-go! Before you dive in please read the following:
|
||||
[FAQ](https://github.com/fatih/vim-go/wiki/FAQ-Troubleshooting), it might
|
||||
have answers for your problem
|
||||
2. If you add a new feature please don't forget to update the documentation:
|
||||
[doc/vim-go.txt](doc/vim-go.txt)
|
||||
[doc/vim-go.txt](https://github.com/fatih/vim-go/blob/master/doc/vim-go.txt)
|
||||
3. If it's a breaking change or exceed +100 lines please open an issue first
|
||||
and describe the changes you want to make.
|
||||
|
@ -2,7 +2,11 @@
|
||||
|
||||
FEATURES:
|
||||
|
||||
* New `:GoAddTags` and `:GoRemoveTags` command based on the tool [gomodifytags](https://github.com/fatih/gomodifytags). This fixes many old bugs that were due prior regexp based implementation. For the usage please read the docs and checkout the demo at: https://github.com/fatih/vim-go/pull/1204 [gh-1204]
|
||||
* New `:GoAddTags` and `:GoRemoveTags` command based on the tool
|
||||
[gomodifytags](https://github.com/fatih/gomodifytags). This fixes many old
|
||||
bugs that were due prior regexp based implementation. For the usage please
|
||||
read the docs and checkout the demo at:
|
||||
https://github.com/fatih/vim-go/pull/1204 [gh-1204]
|
||||
* Add new `errl` snippet that expands to [gh-1185]:
|
||||
|
||||
```
|
||||
@ -10,12 +14,16 @@ if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
```
|
||||
* New `:GoBuildTags` command to change build tags for tools such as `guru`,
|
||||
`gorename`, etc ... There is also a new setting called `g:go_build_tags`
|
||||
[gh-1232]
|
||||
|
||||
IMPROVEMENTS:
|
||||
|
||||
* Lowercase `<Leader>` in mappings examples for consisten documentation across the README [gh-1192]
|
||||
* Lowercase `<Leader>` in mappings examples for consistent documentation across the README [gh-1192]
|
||||
* All of files should be written in utf-8 if the file will be passed to external command. [gh-1184]
|
||||
* `:GoAddTags` is now able to add options to existing tags with the syntax `:GoAddTags key,option`, i.e: `:GoAddTags json,omitempty` [gh-985]
|
||||
* `:GoAddTags` is now able to add options to existing tags with the syntax
|
||||
`:GoAddTags key,option`, i.e: `:GoAddTags json,omitempty` [gh-985]
|
||||
* Document 'noshowmode' requirement for echo_go_info [gh-1197]
|
||||
* Improve godoc view for vertical splits [gh-1195]
|
||||
* Set GOPATH for both possible go guru execution paths (sync and async) [gh-1193]
|
||||
@ -23,7 +31,8 @@ IMPROVEMENTS:
|
||||
BUG FIXES:
|
||||
|
||||
* Honor `g:go_echo_command_info` when dispatching builds in neovim [gh-1176]
|
||||
* Fix `:GoBuild` error in neovim due to invalid jobcontrol handler function signatures (`s:on_stdout`, `s:on_stderr`)[gh-1176]
|
||||
* Fix `:GoBuild` error in neovim due to invalid jobcontrol handler function
|
||||
signatures (`s:on_stdout`, `s:on_stderr`)[gh-1176]
|
||||
* Update statusline before and after `go#jobcontrol#Spawn` command is executed [gh-1176]
|
||||
* Correctly report the value of the 'g:go_guru_tags' variable [gh-1177]
|
||||
* Ensure no trailing `:` exist in GOPATH detection if initial GOPATH is not set [gh-1194]
|
||||
@ -36,12 +45,20 @@ BUG FIXES:
|
||||
* Respect go_fmt_options when running goimports [gh-1211]
|
||||
* Set the filename in the location-list when there is an error with :GoFmt [gh-1199]
|
||||
|
||||
BACKWARDS INCOMPATIBILITIES:
|
||||
|
||||
* The command `:GoGuruTags` is removed in favour of the new command
|
||||
`:GoBuildTags`. This command will be used now not just for `guru`, also for
|
||||
all new commands such as `guru` [gh-1232]
|
||||
* The setting `g:go_guru_tags` is removed in favour of the new setting
|
||||
`g:go_build_tags` [gh-1232]
|
||||
|
||||
|
||||
## 1.11 - (January 9, 2017)
|
||||
|
||||
FEATURES:
|
||||
|
||||
* Travis test integration has been added. Now any file that is added as `<name>_test.vim` will be automatically tested in for every Pull Request (just like how we add tests to Go with `_test.go`). Going forward this will tremendously increase the stability and decrease the maintaince burden of vim-go. [gh-1157]
|
||||
* Travis test integration has been added. Now any file that is added as `<name>_test.vim` will be automatically tested in for every Pull Request (just like how we add tests to Go with `_test.go`). Going forward this will tremendously increase the stability and decrease the maintenance burden of vim-go. [gh-1157]
|
||||
* Add new `g:go_updatetime` setting to change the default updatetime (which was hardcoded previously) [gh-1055]
|
||||
* Add new `g:go_template_use_pkg` setting to enable to use cwd as package name instead of basic template file [gh-1124]
|
||||
|
||||
|
@ -76,6 +76,28 @@ function! go#cmd#Build(bang, ...) abort
|
||||
endfunction
|
||||
|
||||
|
||||
" BuildTags sets or shows the current build tags used for tools
|
||||
function! go#cmd#BuildTags(bang, ...) abort
|
||||
if a:0
|
||||
if a:0 == 1 && a:1 == '""'
|
||||
unlet g:go_build_tags
|
||||
call go#util#EchoSuccess("build tags are cleared")
|
||||
else
|
||||
let g:go_build_tags = a:1
|
||||
call go#util#EchoSuccess("build tags are changed to: ". a:1)
|
||||
endif
|
||||
|
||||
return
|
||||
endif
|
||||
|
||||
if !exists('g:go_build_tags')
|
||||
call go#util#EchoSuccess("build tags are not set")
|
||||
else
|
||||
call go#util#EchoSuccess("current build tags: ". g:go_build_tags)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
|
||||
" Run runs the current file (and their dependencies if any) in a new terminal.
|
||||
function! go#cmd#RunTerm(bang, mode, files) abort
|
||||
if empty(a:files)
|
||||
|
@ -46,8 +46,8 @@ function! s:guru_cmd(args) range abort
|
||||
endif
|
||||
|
||||
" check for any tags
|
||||
if exists('g:go_guru_tags')
|
||||
let tags = get(g:, 'go_guru_tags')
|
||||
if exists('g:go_build_tags')
|
||||
let tags = get(g:, 'go_build_tags')
|
||||
call extend(cmd, ["-tags", tags])
|
||||
let result.tags = tags
|
||||
endif
|
||||
@ -619,24 +619,4 @@ function! go#guru#Scope(...) abort
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! go#guru#Tags(...) abort
|
||||
if a:0
|
||||
if a:0 == 1 && a:1 == '""'
|
||||
unlet g:go_guru_tags
|
||||
call go#util#EchoSuccess("guru tags is cleared")
|
||||
else
|
||||
let g:go_guru_tags = a:1
|
||||
call go#util#EchoSuccess("guru tags changed to: ". a:1)
|
||||
endif
|
||||
|
||||
return
|
||||
endif
|
||||
|
||||
if !exists('g:go_guru_tags')
|
||||
call go#util#EchoSuccess("guru tags is not set")
|
||||
else
|
||||
call go#util#EchoSuccess("current guru tags: ". g:go_guru_tags)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" vim: sw=2 ts=2 et
|
||||
|
@ -41,6 +41,12 @@ function! go#rename#Rename(bang, ...) abort
|
||||
|
||||
let cmd = [bin_path, "-offset", offset, "-to", to_identifier]
|
||||
|
||||
" check for any tags
|
||||
if exists('g:go_build_tags')
|
||||
let tags = get(g:, 'go_build_tags')
|
||||
call extend(cmd, ["-tags", tags])
|
||||
endif
|
||||
|
||||
if go#util#has_job()
|
||||
call go#util#EchoProgress(printf("renaming to '%s' ...", to_identifier))
|
||||
call s:rename_job({
|
||||
|
@ -598,15 +598,16 @@ CTRL-t
|
||||
use the variable |'g:go_metalinter_command'|. To override the maximum
|
||||
linters execution time use |'g:go_metalinter_deadline'| variable.
|
||||
|
||||
*:GoGuruTags*
|
||||
:GoGuruTags [tags]
|
||||
*:GoBuildTags*
|
||||
:GoBuildTags [tags]
|
||||
|
||||
Changes the custom |'g:go_guru_tags'| setting and overrides it with the
|
||||
given build tags. This command cooperate with GoReferrers command when
|
||||
there exist mulitiple build tags in your project, then you can set one of
|
||||
the build tags for GoReferrers to find more accurate.
|
||||
The custom build tags is cleared (unset) if `""` is given. If no arguments
|
||||
is given it prints the current custom build tags.
|
||||
Changes the build tags for various commands. If you have any file that
|
||||
uses a custom build tag, such as `//+build integration` , this command can
|
||||
be used to pass it to all tools that accepts tags, such as guru, gorenate,
|
||||
etc..
|
||||
|
||||
The build tags is cleared (unset) if `""` is given. If no arguments is
|
||||
given it prints the current custom build tags.
|
||||
|
||||
*:AsmFmt*
|
||||
:AsmFmt
|
||||
@ -1208,15 +1209,15 @@ set, so the relevant commands defaults are being used.
|
||||
>
|
||||
let g:go_guru_scope = []
|
||||
<
|
||||
*'g:go_guru_tags'*
|
||||
*'g:go_build_tags'*
|
||||
|
||||
These options that will be automatically passed to the `-tags` option of
|
||||
`go guru` when it's invoked with |:GoDef|. You can use |:GoGuruTags| to set
|
||||
this. By default it's not set.
|
||||
various tools, such as `guru`, `gorename`, etc... This is a permanatent
|
||||
setting. A more useful way is to use |:GoBuildTags| to dynamically change or
|
||||
remove build tags. By default it's not set.
|
||||
>
|
||||
let g:go_guru_tags = ''
|
||||
let g:go_build_tags = ''
|
||||
<
|
||||
|
||||
*'g:go_highlight_array_whitespace_error'*
|
||||
|
||||
Highlights white space after "[]". >
|
||||
|
@ -12,7 +12,6 @@ command! -range=% GoCallstack call go#guru#Callstack(<count>)
|
||||
command! -range=% GoFreevars call go#guru#Freevars(<count>)
|
||||
command! -range=% GoChannelPeers call go#guru#ChannelPeers(<count>)
|
||||
command! -range=% GoReferrers call go#guru#Referrers(<count>)
|
||||
command! -nargs=? GoGuruTags call go#guru#Tags(<f-args>)
|
||||
|
||||
command! -range=0 GoSameIds call go#guru#SameIds()
|
||||
command! -range=0 GoSameIdsClear call go#guru#ClearSameIds()
|
||||
@ -31,6 +30,7 @@ command! -nargs=0 GoAutoTypeInfoToggle call go#complete#ToggleAutoTypeInfo()
|
||||
|
||||
" -- cmd
|
||||
command! -nargs=* -bang GoBuild call go#cmd#Build(<bang>0,<f-args>)
|
||||
command! -nargs=? -bang GoBuildTags call go#cmd#BuildTags(<bang>0, <f-args>)
|
||||
command! -nargs=* -bang GoGenerate call go#cmd#Generate(<bang>0,<f-args>)
|
||||
command! -nargs=* -bang -complete=file GoRun call go#cmd#Run(<bang>0,<f-args>)
|
||||
command! -nargs=* -bang GoInstall call go#cmd#Install(<bang>0, <f-args>)
|
||||
|
Reference in New Issue
Block a user