Skip to content

Commit

Permalink
Updated plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
amix committed Jul 3, 2016
1 parent b50cc96 commit d4db542
Show file tree
Hide file tree
Showing 19 changed files with 274 additions and 172 deletions.
1 change: 1 addition & 0 deletions sources_non_forked/ctrlp.vim/autoload/ctrlp/buffertag.vim
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ let s:types = {
\ 'erlang' : '%serlang%serlang%sdrmf',
\ 'expect' : '%stcl%stcl%scfp',
\ 'fortran': '%sfortran%sfortran%spbceiklmntvfs',
\ 'go' : '%sgo%sgo%sfctv',
\ 'html' : '%shtml%shtml%saf',
\ 'java' : '%sjava%sjava%spcifm',
\ 'javascript': '%sjavascript%sjavascript%sf',
Expand Down
44 changes: 22 additions & 22 deletions sources_non_forked/syntastic/doc/syntastic-checkers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4398,9 +4398,9 @@ The following checkers are available for Python (filetype "python"):
1. flake8...................|syntastic-python-flake8|
2. Frosted..................|syntastic-python-frosted|
3. mypy.....................|syntastic-python-mypy|
4. pep8.....................|syntastic-python-pep8|
5. Prospector...............|syntastic-python-prospector|
6. py3kwarn.................|syntastic-python-py3kwarn|
4. Prospector...............|syntastic-python-prospector|
5. py3kwarn.................|syntastic-python-py3kwarn|
6. pycodestyle..............|syntastic-python-pycodestyle|
7. pydocstyle...............|syntastic-python-pydocstyle|
8. Pyflakes.................|syntastic-python-pyflakes|
9. Pylama...................|syntastic-python-pylama|
Expand Down Expand Up @@ -4460,24 +4460,7 @@ This checker is initialised using the "makeprgBuild()" function and thus it
accepts the standard options described at |syntastic-config-makeprg|.

------------------------------------------------------------------------------
4. pep8 *syntastic-python-pep8*

Name: pep8
Maintainer: LCD 47 <[email protected]>

"Pep8" is a style checker for Python, derived from the conventions in PEP 8
(http://www.python.org/dev/peps/pep-0008/). See the project's page for
details:

https://github.com/jcrocholl/pep8

Checker options~

This checker is initialised using the "makeprgBuild()" function and thus it
accepts the standard options described at |syntastic-config-makeprg|.

------------------------------------------------------------------------------
5. Prospector *syntastic-python-prospector*
4. Prospector *syntastic-python-prospector*

Name: prospector
Maintainer: LCD 47 <[email protected]>
Expand All @@ -4500,7 +4483,7 @@ This checker is initialised using the "makeprgBuild()" function and thus it
accepts the standard options described at |syntastic-config-makeprg|.

------------------------------------------------------------------------------
6. py3kwarn *syntastic-python-py3kwarn*
5. py3kwarn *syntastic-python-py3kwarn*

Name: py3kwarn
Author: Liam Curry <[email protected]>
Expand All @@ -4515,6 +4498,23 @@ Checker options~
This checker is initialised using the "makeprgBuild()" function and thus it
accepts the standard options described at |syntastic-config-makeprg|.

------------------------------------------------------------------------------
6. pycodestyle *syntastic-python-pycodestyle*

Name: pycodestyle
Maintainer: LCD 47 <[email protected]>

"pycodestyle" (formerly "pep8") is a style checker for Python, derived from
the conventions in PEP 8 (http://www.python.org/dev/peps/pep-0008/). See the
project's page for details:

https://github.com/PyCQA/pycodestyle

Checker options~

This checker is initialised using the "makeprgBuild()" function and thus it
accepts the standard options described at |syntastic-config-makeprg|.

------------------------------------------------------------------------------
7. pydocstyle *syntastic-python-pydocstyle*

Expand Down
2 changes: 1 addition & 1 deletion sources_non_forked/syntastic/plugin/syntastic.vim
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if has('reltime')
lockvar! g:_SYNTASTIC_START
endif

let g:_SYNTASTIC_VERSION = '3.7.0-153'
let g:_SYNTASTIC_VERSION = '3.7.0-157'
lockvar g:_SYNTASTIC_VERSION

" Sanity checks {{{1
Expand Down
31 changes: 3 additions & 28 deletions sources_non_forked/syntastic/syntax_checkers/python/pep8.vim
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"============================================================================
"File: pep8.vim
"Description: Syntax checking plugin for syntastic.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: LCD 47 <lcd047 at gmail dot com>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute
Expand All @@ -15,34 +15,9 @@ if exists('g:loaded_syntastic_python_pep8_checker')
endif
let g:loaded_syntastic_python_pep8_checker = 1

let s:save_cpo = &cpo
set cpo&vim

function! SyntaxCheckers_python_pep8_GetLocList() dict
let makeprg = self.makeprgBuild({})

let errorformat = '%f:%l:%c: %m'

let env = syntastic#util#isRunningWindows() ? {} : { 'TERM': 'dumb' }

let loclist = SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'env': env,
\ 'subtype': 'Style' })

for e in loclist
let e['type'] = e['text'] =~? '^W' ? 'W' : 'E'
endfor

return loclist
endfunction

call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'python',
\ 'name': 'pep8'})

let &cpo = s:save_cpo
unlet s:save_cpo
\ 'name': 'pep8',
\ 'redirect': 'python/pycodestyle'})

" vim: set sw=4 sts=4 et fdm=marker:
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
"============================================================================
"File: pycodestyle.vim
"Description: Syntax checking plugin for syntastic
"Maintainer: LCD 47 <lcd047 at gmail dot com>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute
" it and/or modify it under the terms of the Do What The Fuck You
" Want To Public License, Version 2, as published by Sam Hocevar.
" See http://sam.zoy.org/wtfpl/COPYING for more details.
"
"============================================================================

if exists('g:loaded_syntastic_python_pycodestyle_checker')
finish
endif
let g:loaded_syntastic_python_pycodestyle_checker = 1

let s:save_cpo = &cpo
set cpo&vim

function! SyntaxCheckers_python_pycodestyle_GetLocList() dict
let makeprg = self.makeprgBuild({})

let errorformat = '%f:%l:%c: %m'

let env = syntastic#util#isRunningWindows() ? {} : { 'TERM': 'dumb' }

let loclist = SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'env': env,
\ 'subtype': 'Style' })

for e in loclist
let e['type'] = e['text'] =~? '^W' ? 'W' : 'E'
endfor

return loclist
endfunction

call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'python',
\ 'name': 'pycodestyle'})

let &cpo = s:save_cpo
unlet s:save_cpo

" vim: set sw=4 sts=4 et fdm=marker:
2 changes: 1 addition & 1 deletion sources_non_forked/vim-coffee-script/ftplugin/coffee.vim
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ call coffee#CoffeeSetUpVariables()
setlocal formatoptions-=t formatoptions+=croql
setlocal comments=:# commentstring=#\ %s
setlocal omnifunc=javascriptcomplete#CompleteJS
setlocal suffixesadd+=coffee
setlocal suffixesadd+=.coffee

" Create custom augroups.
augroup CoffeeBufUpdate | augroup END
Expand Down
11 changes: 11 additions & 0 deletions sources_non_forked/vim-go/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
## 1.8 (unplanned)

FEATURES:

* If you open a new buffer with a Go filename it get automatically populated based on the directory. If there are no Go files a simple main package is created, otherwise the file will include the package declaration line based on the package in the current directory. Checkout the demo to see it in action: https://twitter.com/fatih/status/748333086643994624. This is enabled by default. Can be disabled with `let g:go_template_autocreate = 0`. You can use your own template with `let g:go_template_file = "foo.go"` and putting the file under the `templates/` folder. [gh-918]

IMPROVEMENTS:

* `:GoDoc` accepts arguments now which are passed directly to `godoc`. So usages like `:GoDoc flag` works again (it was changed in previous versions [gh-894]
* `:GoDef` works now for modified files as well [gh-910]
* Internal: fix indentations on all files to **2-spaces/no tabs**. This is now the default vim-go style across all VimL files [gh-915]
* Syntax: improved syntax highglighting performance for methods, fields, structs and interface type declarations [gh-917]

BUG FIXES:

Expand All @@ -13,6 +18,12 @@ BUG FIXES:
* Fix `:GoCoverage` not running for Neovim [gh-899]
* Fix `:GoFmt` not picking up `-srcdir` if the command was set to use `goimports` [gh-904]
* Fix `:GoTestCompile` to not leave behind artifacts if the cwd and the test files's directory do not match [gh-909]
* Fix `:GoDocBrowser` to not fail if godoc doesn't exist [gh-920]

BACKWARDS INCOMPATIBILITIES:

* `g:go_highlight_structs` and `g:go_highlight_interface` are removed in favor of `g:go_highlight_types` [gh-917]


## 1.7.1 (June 7, 2016)

Expand Down
3 changes: 1 addition & 2 deletions sources_non_forked/vim-go/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,7 @@ To change it:
let g:go_highlight_functions = 1
let g:go_highlight_methods = 1
let g:go_highlight_fields = 1
let g:go_highlight_structs = 1
let g:go_highlight_interfaces = 1
let g:go_highlight_types = 1
let g:go_highlight_operators = 1
let g:go_highlight_build_constraints = 1
```
Expand Down
2 changes: 1 addition & 1 deletion sources_non_forked/vim-go/autoload/go/doc.vim
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function! s:godocWord(args)
if !executable('godoc')
let msg = "godoc command not found."
let msg .= " install with: go get golang.org/x/tools/cmd/godoc"
call go#util#echoWarning(msg)
call go#util#EchoWarning(msg)
return []
endif

Expand Down
31 changes: 31 additions & 0 deletions sources_non_forked/vim-go/autoload/go/template.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
let s:current_file = expand("<sfile>")

function! go#template#create()
let l:root_dir = fnamemodify(s:current_file, ':h:h:h')

let cd = exists('*haslocaldir') && haslocaldir() ? 'lcd ' : 'cd '
let dir = getcwd()
execute cd . fnameescape(expand("%:p:h"))

let l:package_name = go#tool#PackageName()

" if we can't figure out any package name(no Go files or non Go package
" files) from the directory create the template
if l:package_name == -1
let l:template_file = get(g:, 'go_template_file', "hello_world.go")
let l:template_path = go#util#Join(l:root_dir, "templates", l:template_file)
exe '0r ' . l:template_path
$delete _
else
let l:content = printf("package %s", l:package_name)
call append(0, l:content)
$delete _
endif

" Remove the '... [New File]' message line from the command line
echon

execute cd . fnameescape(dir)
endfunction

" vim: sw=2 ts=2 et
10 changes: 10 additions & 0 deletions sources_non_forked/vim-go/autoload/go/tool.vim
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,16 @@ function! go#tool#Imports()
return imports
endfunction

function! go#tool#PackageName()
let command = "go list -f '{{.Name}}'"
let out = go#tool#ExecuteInDir(command)
if go#util#ShellError() != 0
return -1
endif

return split(out, '\n')[0]
endfunction

function! go#tool#ParseErrors(lines)
let errors = []

Expand Down
6 changes: 6 additions & 0 deletions sources_non_forked/vim-go/autoload/go/util.vim
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ function! go#util#LineEnding()
return "\n"
endfunction

" Join joins any number of path elements into a single path, adding a
" Separator if necessary and returns the result
function! go#util#Join(...)
return join(a:000, go#util#PathSep())
endfunction

" IsWin returns 1 if current OS is Windows or 0 otherwise
function! go#util#IsWin()
let win = ['win16', 'win32', 'win64', 'win95']
Expand Down
34 changes: 25 additions & 9 deletions sources_non_forked/vim-go/doc/vim-go.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1118,23 +1118,17 @@ Highlights method names. By default it's disabled. >
let g:go_highlight_methods = 0
<
*'g:go_highlight_structs'*
*'g:go_highlight_types'*

Highlights struct names. By default it's disabled. >
Highlights struct and interface names. By default it's disabled. >
let g:go_highlight_structs = 0
let g:go_highlight_types = 0
<
*'g:go_highlight_fields'*

Highlights field names. By default it's disabled. >
let g:go_highlight_fields = 0
<
*'g:go_highlight_interfaces'*

Highlights interface names. By default it's disabled. >
let g:go_highlight_interfaces = 0
<
*'g:go_highlight_build_constraints'*

Expand Down Expand Up @@ -1291,8 +1285,30 @@ Specifies whether `gocode` should add built-in types, functions and constants
to an autocompletion proposals. By default it is enabled.
>
let g:go_gocode_propose_builtins = 1
<
*g:go_template_autocreate*

When a new Go file is created, vim-go automatically fills the buffer content
with a Go code template. By default the template under
`templates/hello_world.go` is used. This can be changed with the
|g:go_template_file| setting.

If the new file is created in an already prepopulated package (with other Go
files), in this case a Go code template with only the Go package declaration
(which is automatically determined according to the current package) is added.

By default it is enabled.
>
let g:go_template_autocreate = 1
<
*g:go_template_file*

Specifies the file under the `templates` folder that is used if a new Go file
is created. Checkout |g:go_template_autocreate| for more info. By default the
`hello_world.go` file is used.
>
let g:go_template_file = "hello_world.go"
<
===============================================================================
TROUBLESHOOTING *go-troubleshooting*

Expand Down
5 changes: 5 additions & 0 deletions sources_non_forked/vim-go/plugin/go.vim
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,11 @@ augroup vim-go
if get(g:, "go_metalinter_autosave", 0)
autocmd BufWritePost *.go call go#lint#Gometa(1)
endif

" create new template from scratch
if get(g:, "go_template_autocreate", 1)
autocmd BufNewFile *.go call go#template#create()
endif
augroup END

" vim: sw=2 ts=2 et
Loading

0 comments on commit d4db542

Please sign in to comment.