1
0
Fork 0
mirror of synced 2024-11-22 08:45:34 -05:00

Updated vim plugins

This commit is contained in:
amix 2016-08-20 13:23:52 +02:00
parent 61a22e9f3e
commit f8d1d3bb50
27 changed files with 264 additions and 208 deletions

View file

@ -2,10 +2,79 @@
" Filename: autoload/lightline/colorscheme/solarized.vim " Filename: autoload/lightline/colorscheme/solarized.vim
" Author: itchyny " Author: itchyny
" License: MIT License " License: MIT License
" Last Change: 2013/08/27 10:24:28. " Last Change: 2016/08/08 10:31:00.
" ============================================================================= " =============================================================================
if &background ==# 'light'
let g:lightline#colorscheme#solarized#palette = g:lightline#colorscheme#solarized_light#palette let s:cuicolors = {
\ 'base03': [ '8', '234', 'DarkGray' ],
\ 'base02': [ '0', '235', 'Black' ],
\ 'base01': [ '10', '239', 'LightGreen' ],
\ 'base00': [ '11', '240', 'LightYellow' ],
\ 'base0': [ '12', '244', 'LightBlue' ],
\ 'base1': [ '14', '245', 'LightCyan' ],
\ 'base2': [ '7', '187', 'LightGray' ],
\ 'base3': [ '15', '230', 'White' ],
\ 'yellow': [ '3', '136', 'DarkYellow' ],
\ 'orange': [ '9', '166', 'LightRed' ],
\ 'red': [ '1', '124', 'DarkRed' ],
\ 'magenta': [ '5', '125', 'DarkMagenta' ],
\ 'violet': [ '13', '61', 'LightMagenta' ],
\ 'blue': [ '4', '33', 'DarkBlue' ],
\ 'cyan': [ '6', '37', 'DarkCyan' ],
\ 'green': [ '2', '64', 'DarkGreen' ],
\ }
" The following condition only applies for the console and is the same
" condition vim-colors-solarized uses to determine which set of colors
" to use.
let s:solarized_termcolors = get(g:, 'solarized_termcolors', 256)
if s:solarized_termcolors != 256 && &t_Co >= 16
let s:cuiindex = 0
elseif s:solarized_termcolors == 256
let s:cuiindex = 1
else else
let g:lightline#colorscheme#solarized#palette = g:lightline#colorscheme#solarized_dark#palette let s:cuiindex = 2
endif endif
let s:base03 = [ '#002b36', s:cuicolors.base03[s:cuiindex] ]
let s:base02 = [ '#073642', s:cuicolors.base02[s:cuiindex] ]
let s:base01 = [ '#586e75', s:cuicolors.base01[s:cuiindex] ]
let s:base00 = [ '#657b83', s:cuicolors.base00[s:cuiindex] ]
let s:base0 = [ '#839496', s:cuicolors.base0[s:cuiindex] ]
let s:base1 = [ '#93a1a1', s:cuicolors.base1[s:cuiindex] ]
let s:base2 = [ '#eee8d5', s:cuicolors.base2[s:cuiindex] ]
let s:base3 = [ '#fdf6e3', s:cuicolors.base3[s:cuiindex] ]
let s:yellow = [ '#b58900', s:cuicolors.yellow[s:cuiindex] ]
let s:orange = [ '#cb4b16', s:cuicolors.orange[s:cuiindex] ]
let s:red = [ '#dc322f', s:cuicolors.red[s:cuiindex] ]
let s:magenta = [ '#d33682', s:cuicolors.magenta[s:cuiindex] ]
let s:violet = [ '#6c71c4', s:cuicolors.violet[s:cuiindex] ]
let s:blue = [ '#268bd2', s:cuicolors.blue[s:cuiindex] ]
let s:cyan = [ '#2aa198', s:cuicolors.cyan[s:cuiindex] ]
let s:green = [ '#859900', s:cuicolors.green[s:cuiindex] ]
if &background ==# 'light'
let [ s:base03, s:base3 ] = [ s:base3, s:base03 ]
let [ s:base02, s:base2 ] = [ s:base2, s:base02 ]
let [ s:base01, s:base1 ] = [ s:base1, s:base01 ]
let [ s:base00, s:base0 ] = [ s:base0, s:base00 ]
endif
let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {}}
let s:p.normal.left = [ [ s:base03, s:blue ], [ s:base03, s:base00 ] ]
let s:p.normal.right = [ [ s:base03, s:base1 ], [ s:base03, s:base00 ] ]
let s:p.inactive.right = [ [ s:base03, s:base00 ], [ s:base0, s:base02 ] ]
let s:p.inactive.left = [ [ s:base0, s:base02 ], [ s:base0, s:base02 ] ]
let s:p.insert.left = [ [ s:base03, s:green ], [ s:base03, s:base00 ] ]
let s:p.replace.left = [ [ s:base03, s:red ], [ s:base03, s:base00 ] ]
let s:p.visual.left = [ [ s:base03, s:magenta ], [ s:base03, s:base00 ] ]
let s:p.normal.middle = [ [ s:base1, s:base02 ] ]
let s:p.inactive.middle = [ [ s:base01, s:base02 ] ]
let s:p.tabline.left = [ [ s:base03, s:base00 ] ]
let s:p.tabline.tabsel = [ [ s:base03, s:base1 ] ]
let s:p.tabline.middle = [ [ s:base0, s:base02 ] ]
let s:p.tabline.right = copy(s:p.normal.right)
let s:p.normal.error = [ [ s:base03, s:red ] ]
let s:p.normal.warning = [ [ s:base03, s:yellow ] ]
let g:lightline#colorscheme#solarized#palette = lightline#colorscheme#flatten(s:p)

View file

@ -1,73 +0,0 @@
" =============================================================================
" Filename: autoload/lightline/colorscheme/solarized_dark.vim
" Author: itchyny
" License: MIT License
" Last Change: 2014/05/31 01:04:15.
" =============================================================================
let s:cuicolors = {
\ 'base03': [ '8', '234', 'DarkGray' ],
\ 'base02': [ '0', '235', 'Black' ],
\ 'base01': [ '10', '239', 'LightGreen' ],
\ 'base00': [ '11', '240', 'LightYellow' ],
\ 'base0': [ '12', '244', 'LightBlue' ],
\ 'base1': [ '14', '245', 'LightCyan' ],
\ 'base2': [ '7', '187', 'LightGray' ],
\ 'base3': [ '15', '230', 'White' ],
\ 'yellow': [ '3', '136', 'DarkYellow' ],
\ 'orange': [ '9', '166', 'LightRed' ],
\ 'red': [ '1', '124', 'DarkRed' ],
\ 'magenta': [ '5', '125', 'DarkMagenta' ],
\ 'violet': [ '13', '61', 'LightMagenta' ],
\ 'blue': [ '4', '33', 'DarkBlue' ],
\ 'cyan': [ '6', '37', 'DarkCyan' ],
\ 'green': [ '2', '64', 'DarkGreen' ],
\ }
" The following condition only applies for the console and is the same
" condition vim-colors-solarized uses to determine which set of colors
" to use.
let s:solarized_termcolors = get(g:, 'solarized_termcolors', 256)
if s:solarized_termcolors != 256 && &t_Co >= 16
let s:cuiindex = 0
elseif s:solarized_termcolors == 256
let s:cuiindex = 1
else
let s:cuiindex = 2
endif
let s:base03 = [ '#002b36', s:cuicolors.base03[s:cuiindex] ]
let s:base02 = [ '#073642', s:cuicolors.base02[s:cuiindex] ]
let s:base01 = [ '#586e75', s:cuicolors.base01[s:cuiindex] ]
let s:base00 = [ '#657b83', s:cuicolors.base00[s:cuiindex] ]
let s:base0 = [ '#839496', s:cuicolors.base0[s:cuiindex] ]
let s:base1 = [ '#93a1a1', s:cuicolors.base1[s:cuiindex] ]
let s:base2 = [ '#eee8d5', s:cuicolors.base2[s:cuiindex] ]
let s:base3 = [ '#fdf6e3', s:cuicolors.base3[s:cuiindex] ]
let s:yellow = [ '#b58900', s:cuicolors.yellow[s:cuiindex] ]
let s:orange = [ '#cb4b16', s:cuicolors.orange[s:cuiindex] ]
let s:red = [ '#dc322f', s:cuicolors.red[s:cuiindex] ]
let s:magenta = [ '#d33682', s:cuicolors.magenta[s:cuiindex] ]
let s:violet = [ '#6c71c4', s:cuicolors.violet[s:cuiindex] ]
let s:blue = [ '#268bd2', s:cuicolors.blue[s:cuiindex] ]
let s:cyan = [ '#2aa198', s:cuicolors.cyan[s:cuiindex] ]
let s:green = [ '#859900', s:cuicolors.green[s:cuiindex] ]
let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {}}
let s:p.normal.left = [ [ s:base3, s:blue ], [ s:base3, s:base01 ] ]
let s:p.normal.right = [ [ s:base02, s:base0 ], [ s:base1, s:base01 ] ]
let s:p.inactive.right = [ [ s:base02, s:base01 ], [ s:base00, s:base02 ] ]
let s:p.inactive.left = [ [ s:base0, s:base02 ], [ s:base00, s:base02 ] ]
let s:p.insert.left = [ [ s:base3, s:green ], [ s:base3, s:base01 ] ]
let s:p.replace.left = [ [ s:base3, s:red ], [ s:base3, s:base01 ] ]
let s:p.visual.left = [ [ s:base3, s:magenta ], [ s:base3, s:base01 ] ]
let s:p.normal.middle = [ [ s:base1, s:base02 ] ]
let s:p.inactive.middle = [ [ s:base0, s:base02 ] ]
let s:p.tabline.left = [ [ s:base1, s:base00 ] ]
let s:p.tabline.tabsel = [ [ s:base3, s:base0 ] ]
let s:p.tabline.middle = [ [ s:base01, s:base02 ] ]
let s:p.tabline.right = copy(s:p.normal.right)
let s:p.normal.error = [ [ s:base2, s:red ] ]
let s:p.normal.warning = [ [ s:base02, s:yellow ] ]
let g:lightline#colorscheme#solarized_dark#palette = lightline#colorscheme#flatten(s:p)

View file

@ -1,80 +0,0 @@
" =============================================================================
" Filename: autoload/lightline/colorscheme/solarized_light.vim
" Author: itchyny
" License: MIT License
" Last Change: 2014/05/31 01:04:21.
" =============================================================================
let s:cuicolors = {
\ 'base03': [ '8', '234', 'DarkGray' ],
\ 'base02': [ '0', '235', 'Black' ],
\ 'base01': [ '10', '239', 'LightGreen' ],
\ 'base00': [ '11', '240', 'LightYellow' ],
\ 'base0': [ '12', '244', 'LightBlue' ],
\ 'base1': [ '14', '245', 'LightCyan' ],
\ 'base2': [ '7', '187', 'LightGray' ],
\ 'base3': [ '15', '230', 'White' ],
\ 'yellow': [ '3', '136', 'DarkYellow' ],
\ 'orange': [ '9', '166', 'LightRed' ],
\ 'red': [ '1', '124', 'DarkRed' ],
\ 'magenta': [ '5', '125', 'DarkMagenta' ],
\ 'violet': [ '13', '61', 'LightMagenta' ],
\ 'blue': [ '4', '33', 'DarkBlue' ],
\ 'cyan': [ '6', '37', 'DarkCyan' ],
\ 'green': [ '2', '64', 'DarkGreen' ],
\ }
" The following condition only applies for the console and is the same
" condition vim-colors-solarized uses to determine which set of colors
" to use.
let s:solarized_termcolors = get(g:, 'solarized_termcolors', 256)
if s:solarized_termcolors != 256 && &t_Co >= 16
let s:cuiindex = 0
elseif s:solarized_termcolors == 256
let s:cuiindex = 1
else
let s:cuiindex = 2
endif
let s:base03 = [ '#002b36', s:cuicolors.base03[s:cuiindex] ]
let s:base02 = [ '#073642', s:cuicolors.base02[s:cuiindex] ]
let s:base01 = [ '#586e75', s:cuicolors.base01[s:cuiindex] ]
let s:base00 = [ '#657b83', s:cuicolors.base00[s:cuiindex] ]
let s:base0 = [ '#839496', s:cuicolors.base0[s:cuiindex] ]
let s:base1 = [ '#93a1a1', s:cuicolors.base1[s:cuiindex] ]
let s:base2 = [ '#eee8d5', s:cuicolors.base2[s:cuiindex] ]
let s:base3 = [ '#fdf6e3', s:cuicolors.base3[s:cuiindex] ]
let s:yellow = [ '#b58900', s:cuicolors.yellow[s:cuiindex] ]
let s:orange = [ '#cb4b16', s:cuicolors.orange[s:cuiindex] ]
let s:red = [ '#dc322f', s:cuicolors.red[s:cuiindex] ]
let s:magenta = [ '#d33682', s:cuicolors.magenta[s:cuiindex] ]
let s:violet = [ '#6c71c4', s:cuicolors.violet[s:cuiindex] ]
let s:blue = [ '#268bd2', s:cuicolors.blue[s:cuiindex] ]
let s:cyan = [ '#2aa198', s:cuicolors.cyan[s:cuiindex] ]
let s:green = [ '#859900', s:cuicolors.green[s:cuiindex] ]
let [s:base03, s:base3] = [s:base3, s:base03]
let [s:base02, s:base2] = [s:base2, s:base02]
let [s:base01, s:base1] = [s:base1, s:base01]
let [s:base00, s:base0] = [s:base0, s:base00]
let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {}}
let s:p.normal.left = [ [ s:base3, s:blue ], [ s:base3, s:base01 ] ]
let s:p.normal.right = [ [ s:base02, s:base0 ], [ s:base1, s:base01 ] ]
let s:p.inactive.right = [ [ s:base02, s:base01 ], [ s:base00, s:base02 ] ]
let s:p.inactive.left = [ [ s:base0, s:base02 ], [ s:base00, s:base02 ] ]
let s:p.insert.left = [ [ s:base3, s:green ], [ s:base3, s:base01 ] ]
let s:p.replace.left = [ [ s:base3, s:red ], [ s:base3, s:base01 ] ]
let s:p.visual.left = [ [ s:base3, s:magenta ], [ s:base3, s:base01 ] ]
let s:p.normal.middle = [ [ s:base1, s:base02 ] ]
let s:p.inactive.middle = [ [ s:base0, s:base02 ] ]
let s:p.tabline.left = [ [ s:base2, s:base01 ] ]
let s:p.tabline.tabsel = [ [ s:base2, s:base03 ] ]
let s:p.tabline.middle = [ [ s:base1, s:base02 ] ]
let s:p.tabline.right = copy(s:p.normal.right)
let s:p.normal.error = [ [ s:red, s:base01 ] ]
let s:p.normal.warning = [ [ s:yellow, s:base01 ] ]
let s:p.normal.error = [ [ s:base02, s:red ] ]
let s:p.normal.warning = [ [ s:base2, s:yellow ] ]
let g:lightline#colorscheme#solarized_light#palette = lightline#colorscheme#flatten(s:p)

View file

@ -4,7 +4,7 @@ Version: 0.0
Author: itchyny (https://github.com/itchyny) Author: itchyny (https://github.com/itchyny)
License: MIT License License: MIT License
Repository: https://github.com/itchyny/lightline.vim Repository: https://github.com/itchyny/lightline.vim
Last Change: 2016/05/26 21:57:34. Last Change: 2016/08/09 06:22:39.
CONTENTS *lightline-contents* CONTENTS *lightline-contents*
@ -1202,8 +1202,7 @@ Problem 13: *lightline-problem-13*
try try
if g:colors_name =~# 'wombat\|solarized\|landscape\|jellybeans\|seoul256\|Tomorrow' if g:colors_name =~# 'wombat\|solarized\|landscape\|jellybeans\|seoul256\|Tomorrow'
let g:lightline.colorscheme = let g:lightline.colorscheme =
\ substitute(substitute(g:colors_name, '-', '_', 'g'), '256.*', '', '') . \ substitute(substitute(g:colors_name, '-', '_', 'g'), '256.*', '', '')
\ (g:colors_name ==# 'solarized' ? '_' . &background : '')
call lightline#init() call lightline#init()
call lightline#colorscheme() call lightline#colorscheme()
call lightline#update() call lightline#update()

View file

@ -65,11 +65,11 @@ JSX, LESS, Lex, Limbo, LISP, LLVM intermediate language, Lua, Markdown,
MATLAB, Mercury, NASM, Nix, Objective-C, Objective-C++, OCaml, Perl, Perl MATLAB, Mercury, NASM, Nix, Objective-C, Objective-C++, OCaml, Perl, Perl
POD, PHP, gettext Portable Object, OS X and iOS property lists, Pug (formerly POD, PHP, gettext Portable Object, OS X and iOS property lists, Pug (formerly
Jade), Puppet, Python, QML, R, Racket, RDF TriG, RDF Turtle, Relax NG, Jade), Puppet, Python, QML, R, Racket, RDF TriG, RDF Turtle, Relax NG,
reStructuredText, RPM spec, Ruby, SASS/SCSS, Scala, Slim, SML, Sphinx, SQL, reStructuredText, RPM spec, Ruby, SASS/SCSS, Scala, Slim, SML, Solidity,
Stylus, Tcl, TeX, Texinfo, Twig, TypeScript, Vala, Verilog, VHDL, VimL, xHtml, Sphinx, SQL, Stylus, Tcl, TeX, Texinfo, Twig, TypeScript, Vala, Verilog,
XML, XSLT, XQuery, YACC, YAML, YANG data models, z80, Zope page templates, and VHDL, VimL, xHtml, XML, XSLT, XQuery, YACC, YAML, YANG data models, z80, Zope
Zsh. See the [manual][checkers] for details about the corresponding supported page templates, and Zsh. See the [manual][checkers] for details about the
checkers (`:help syntastic-checkers` in Vim). corresponding supported checkers (`:help syntastic-checkers` in Vim).
A number of third-party Vim plugins also provide checkers for syntastic, for A number of third-party Vim plugins also provide checkers for syntastic, for
example: [merlin][merlin], [omnisharp-vim][omnisharp], [rust.vim][rust], example: [merlin][merlin], [omnisharp-vim][omnisharp], [rust.vim][rust],
@ -456,12 +456,12 @@ For example for `jscs`:
```vim ```vim
function! FindConfig(prefix, what, where) function! FindConfig(prefix, what, where)
let cfg = findfile(a:what, escape(a:where, ' ') . ';') let cfg = findfile(a:what, escape(a:where, ' ') . ';')
return cfg !=# '' ? ' ' . a:prefix . ' ' . cfg : '' return cfg !=# '' ? ' ' . a:prefix . ' ' . shellescape(cfg) : ''
endfunction endfunction
autocmd FileType javascript let b:syntastic_javascript_jscs_args = autocmd FileType javascript let b:syntastic_javascript_jscs_args =
\ get(g:, 'syntastic_javascript_jscs_args', '') . \ get(g:, 'syntastic_javascript_jscs_args', '') .
\ FindConfig('-c', '.jscsrc', expand('<amatch>:p:h', 1)) \ FindConfig('-c', '.jscsrc', expand('<afile>:p:h', 1))
``` ```
<a name="faqbdelete"></a> <a name="faqbdelete"></a>

View file

@ -89,11 +89,11 @@ function! syntastic#preprocess#dockerfile_lint(errors) abort " {{{2
call add(out, msg) call add(out, msg)
endfor endfor
catch /\m^Vim\%((\a\+)\)\=:E716/ catch /\m^Vim\%((\a\+)\)\=:E716/
call syntastic#log#warn('checker dockerfile/dockerfile_lint: unrecognized error format') call syntastic#log#warn('checker dockerfile/dockerfile_lint: unrecognized error format (crashed checker?)')
let out = [] let out = []
endtry endtry
else else
call syntastic#log#warn('checker dockerfile/dockerfile_lint: unrecognized error format') call syntastic#log#warn('checker dockerfile/dockerfile_lint: unrecognized error format (crashed checker?)')
endif endif
return out return out
endfunction " }}}2 endfunction " }}}2
@ -132,18 +132,18 @@ function! syntastic#preprocess#flow(errors) abort " {{{2
call add(out, msg) call add(out, msg)
catch /\m^Vim\%((\a\+)\)\=:E716/ catch /\m^Vim\%((\a\+)\)\=:E716/
call syntastic#log#warn('checker javascript/flow: unrecognized error format') call syntastic#log#warn('checker javascript/flow: unrecognized error format (crashed checker?)')
let out = [] let out = []
break break
endtry endtry
else else
call syntastic#log#warn('checker javascript/flow: unrecognized error format') call syntastic#log#warn('checker javascript/flow: unrecognized error format (crashed checker?)')
let out = [] let out = []
break break
endif endif
endfor endfor
else else
call syntastic#log#warn('checker javascript/flow: unrecognized error format') call syntastic#log#warn('checker javascript/flow: unrecognized error format (crashed checker?)')
endif endif
return out return out
@ -178,11 +178,11 @@ function! syntastic#preprocess#jscs(errors) abort " {{{2
endtry endtry
endfor endfor
else else
call syntastic#log#warn('checker javascript/jscs: unrecognized error format') call syntastic#log#warn('checker javascript/jscs: unrecognized error format (crashed checker?)')
endif endif
endfor endfor
else else
call syntastic#log#warn('checker javascript/jscs: unrecognized error format') call syntastic#log#warn('checker javascript/jscs: unrecognized error format (crashed checker?)')
endif endif
return out return out
endfunction " }}}2 endfunction " }}}2
@ -238,7 +238,7 @@ function! syntastic#preprocess#prospector(errors) abort " {{{2
endif endif
endfor endfor
else else
call syntastic#log#warn('checker python/prospector: unrecognized error format') call syntastic#log#warn('checker python/prospector: unrecognized error format (crashed checker?)')
endif endif
endif endif
@ -311,11 +311,11 @@ function! syntastic#preprocess#scss_lint(errors) abort " {{{2
endtry endtry
endfor endfor
else else
call syntastic#log#warn('checker scss/scss_lint: unrecognized error format') call syntastic#log#warn('checker scss/scss_lint: unrecognized error format (crashed checker?)')
endif endif
endfor endfor
else else
call syntastic#log#warn('checker scss/scss_lint: unrecognized error format') call syntastic#log#warn('checker scss/scss_lint: unrecognized error format (crashed checker?)')
endif endif
return out return out
endfunction " }}}2 endfunction " }}}2
@ -351,7 +351,7 @@ function! syntastic#preprocess#stylelint(errors) abort " {{{2
endtry endtry
endfor endfor
else else
call syntastic#log#warn('checker css/stylelint: unrecognized error format') call syntastic#log#warn('checker css/stylelint: unrecognized error format (crashed checker?)')
endif endif
endif endif
return out return out
@ -398,7 +398,7 @@ echomsg string(json)
endtry endtry
endfor endfor
else else
call syntastic#log#warn('checker javascript/tern_lint: unrecognized error format') call syntastic#log#warn('checker javascript/tern_lint: unrecognized error format (crashed checker?)')
endif endif
echomsg string(out) echomsg string(out)
@ -453,7 +453,7 @@ function! syntastic#preprocess#vint(errors) abort " {{{2
endif endif
endfor endfor
else else
call syntastic#log#warn('checker vim/vint: unrecognized error format') call syntastic#log#warn('checker vim/vint: unrecognized error format (crashed checker?)')
endif endif
return out return out

View file

@ -101,6 +101,7 @@ SYNTAX CHECKERS BY LANGUAGE *syntastic-checkers-lang*
Sh.......................................|syntastic-checkers-sh| Sh.......................................|syntastic-checkers-sh|
Slim.....................................|syntastic-checkers-slim| Slim.....................................|syntastic-checkers-slim|
SML......................................|syntastic-checkers-sml| SML......................................|syntastic-checkers-sml|
Solidity.................................|syntastic-checkers-solidity|
SQL......................................|syntastic-checkers-sql| SQL......................................|syntastic-checkers-sql|
Stylus...................................|syntastic-checkers-stylus| Stylus...................................|syntastic-checkers-stylus|
@ -5779,6 +5780,37 @@ Checker options~
This checker is initialised using the "makeprgBuild()" function and thus it This checker is initialised using the "makeprgBuild()" function and thus it
accepts the standard options described at |syntastic-config-makeprg|. accepts the standard options described at |syntastic-config-makeprg|.
==============================================================================
SYNTAX CHECKERS FOR SOLIDITY *syntastic-checkers-solidity*
The following checkers are available for Solidity (filetype "solidity"):
1. solc.....................|syntastic-solidity-solc|
------------------------------------------------------------------------------
1. solc *syntastic-solidity-solc*
Name: solc
Maintainer: Jacob Cholewa <jacob@cholewa.dk>
"solc" is a compiler for Ethereum's smart-contract language "Solidity"
(https://solidity.readthedocs.io/). See the project's page for details:
https://github.com/ethereum/solidity
Checker options~
This checker is initialised using the "makeprgBuild()" function and thus it
accepts the standard options described at |syntastic-config-makeprg|.
Note~
You probably also need a plugin to set |filetype| for Solidity files, such as
"vim-solidity":
https://github.com/tomlion/vim-solidity
============================================================================== ==============================================================================
SYNTAX CHECKERS FOR SQL *syntastic-checkers-sql* SYNTAX CHECKERS FOR SQL *syntastic-checkers-sql*

View file

@ -19,7 +19,7 @@ if has('reltime')
lockvar! g:_SYNTASTIC_START lockvar! g:_SYNTASTIC_START
endif endif
let g:_SYNTASTIC_VERSION = '3.7.0-177' let g:_SYNTASTIC_VERSION = '3.7.0-193'
lockvar g:_SYNTASTIC_VERSION lockvar g:_SYNTASTIC_VERSION
" Sanity checks {{{1 " Sanity checks {{{1

View file

@ -85,6 +85,7 @@ let s:_DEFAULT_CHECKERS = {
\ 'slim': ['slimrb'], \ 'slim': ['slimrb'],
\ 'sml': ['smlnj'], \ 'sml': ['smlnj'],
\ 'spec': ['rpmlint'], \ 'spec': ['rpmlint'],
\ 'solidity': ['solc'],
\ 'sql': ['sqlint'], \ 'sql': ['sqlint'],
\ 'stylus': ['stylint'], \ 'stylus': ['stylint'],
\ 'tcl': ['nagelfar'], \ 'tcl': ['nagelfar'],

View file

@ -1,7 +1,7 @@
"============================================================================ "============================================================================
"File: dockerfile_lint.vim "File: dockerfile_lint.vim
"Description: Syntax checking plugin for syntastic.vim using dockerfile-lint "Description: Syntax checking plugin for syntastic.vim using dockerfile-lint
" (https://github.com/projectatomic/dockerfile-lint). " (https://github.com/projectatomic/dockerfile_lint).
"Maintainer: Tim Carry <tim at pixelastic dot com> "Maintainer: Tim Carry <tim at pixelastic dot com>
"License: This program is free software. It comes without any warranty, "License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute " to the extent permitted by applicable law. You can redistribute

View file

@ -1,6 +1,6 @@
"============================================================================ "============================================================================
"File: perl.vim "File: perl.vim
"Description: Syntax checking plugin for syntastic.vim "Description: Syntax checking plugin for syntastic
"Maintainer: Anthony Carapetis <anthony.carapetis at gmail dot com>, "Maintainer: Anthony Carapetis <anthony.carapetis at gmail dot com>,
" Eric Harmon <http://eharmon.net> " Eric Harmon <http://eharmon.net>
"License: This program is free software. It comes without any warranty, "License: This program is free software. It comes without any warranty,
@ -23,7 +23,7 @@
" "
" let g:syntastic_enable_perl_checker = 1 " let g:syntastic_enable_perl_checker = 1
" "
" References: " Reference:
" "
" - http://perldoc.perl.org/perlrun.html#*-c* " - http://perldoc.perl.org/perlrun.html#*-c*
@ -55,15 +55,15 @@ function! SyntaxCheckers_perl_perl_GetLocList() dict " {{{1
call syntastic#log#oneTimeWarn('variable g:syntastic_perl_lib_path should be a list') call syntastic#log#oneTimeWarn('variable g:syntastic_perl_lib_path should be a list')
let includes = split(g:syntastic_perl_lib_path, ',') let includes = split(g:syntastic_perl_lib_path, ',')
else else
let includes = copy(syntastic#util#var('perl_lib_path')) let includes = copy(syntastic#util#var('perl_lib_path', []))
endif endif
let shebang = syntastic#util#parseShebang() let shebang = syntastic#util#parseShebang()
let extra = join(map(includes, '"-I" . v:val')) . let extra = map(includes, '"-I" . v:val') +
\ (index(shebang['args'], '-T') >= 0 ? ' -T' : '') . \ (index(shebang['args'], '-T') >= 0 ? ['-T'] : []) +
\ (index(shebang['args'], '-t') >= 0 ? ' -t' : '') \ (index(shebang['args'], '-t') >= 0 ? ['-t'] : [])
let errorformat = '%f:%l:%m' let errorformat = '%f:%l:%m'
let makeprg = self.makeprgBuild({ 'args_before': '-c -X ' . extra }) let makeprg = self.makeprgBuild({ 'args_before': ['-c', '-X '] + extra })
let errors = SyntasticMake({ let errors = SyntasticMake({
\ 'makeprg': makeprg, \ 'makeprg': makeprg,
@ -74,7 +74,7 @@ function! SyntaxCheckers_perl_perl_GetLocList() dict " {{{1
return errors return errors
endif endif
let makeprg = self.makeprgBuild({ 'args_before': '-c -Mwarnings ' . extra }) let makeprg = self.makeprgBuild({ 'args_before': ['-c', '-Mwarnings'] + extra })
return SyntasticMake({ return SyntasticMake({
\ 'makeprg': makeprg, \ 'makeprg': makeprg,

View file

@ -25,11 +25,12 @@ function! SyntaxCheckers_scala_fsc_GetLocList() dict
" working directory changing after being started " working directory changing after being started
" that's why we better pass an absolute path " that's why we better pass an absolute path
let makeprg = self.makeprgBuild({ let makeprg = self.makeprgBuild({
\ 'args_after': '-Ystop-after:parser', \ 'args': '-Ystop-after:parser',
\ 'fname': syntastic#util#shexpand('%:p') }) \ 'fname': syntastic#util#shexpand('%:p') })
let errorformat = let errorformat =
\ '%E%f:%l: %trror: %m,' . \ '%E%f:%l: %trror: %m,' .
\ '%W%f:%l: %tarning:%m,' .
\ '%Z%p^,' . \ '%Z%p^,' .
\ '%-G%.%#' \ '%-G%.%#'

View file

@ -0,0 +1,38 @@
"============================================================================
"File: solc.vim
"Description: Solidity syntax checker - using solc
"Maintainer: Jacob Cholewa <jacob@cholewa.dk>
"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_solidity_solc_checker')
finish
endif
let g:loaded_syntastic_solidity_solc_checker = 1
let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_solidity_solc_GetLocList() dict
let makeprg = self.makeprgBuild({})
let errorformat = '%f:%l:%c: %trror: %m'
return SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat })
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'solidity',
\ 'name': 'solc'})
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: set sw=4 sts=4 et fdm=marker:

View file

@ -3,6 +3,11 @@
" URL: http://github.com/kchmck/vim-coffee-script " URL: http://github.com/kchmck/vim-coffee-script
" License: WTFPL " License: WTFPL
if exists('b:current_syntax')
let s:current_syntax_save = b:current_syntax
endif
" Inherit coffee from html so coffeeComment isn't redefined and given higher " Inherit coffee from html so coffeeComment isn't redefined and given higher
" priority than hamlInterpolation. " priority than hamlInterpolation.
syn cluster hamlCoffeescript contains=@htmlCoffeeScript syn cluster hamlCoffeescript contains=@htmlCoffeeScript
@ -11,3 +16,8 @@ syn region hamlCoffeescriptFilter matchgroup=hamlFilter
\ end="^\%(\z1 \| *$\)\@!" \ end="^\%(\z1 \| *$\)\@!"
\ contains=@hamlCoffeeScript,hamlInterpolation \ contains=@hamlCoffeeScript,hamlInterpolation
\ keepend \ keepend
if exists('s:current_syntax_save')
let b:current_syntax = s:current_syntax_save
unlet s:current_syntax_save
endif

View file

@ -3,9 +3,18 @@
" URL: http://github.com/kchmck/vim-coffee-script " URL: http://github.com/kchmck/vim-coffee-script
" License: WTFPL " License: WTFPL
if exists('b:current_syntax')
let s:current_syntax_save = b:current_syntax
endif
" Syntax highlighting for text/coffeescript script tags " Syntax highlighting for text/coffeescript script tags
syn include @htmlCoffeeScript syntax/coffee.vim syn include @htmlCoffeeScript syntax/coffee.vim
syn region coffeeScript start=#<script [^>]*type="text/coffeescript"[^>]*># syn region coffeeScript start=#<script [^>]*type="text/coffeescript"[^>]*>#
\ end=#</script>#me=s-1 keepend \ end=#</script>#me=s-1 keepend
\ contains=@htmlCoffeeScript,htmlScriptTag,@htmlPreproc \ contains=@htmlCoffeeScript,htmlScriptTag,@htmlPreproc
\ containedin=htmlHead \ containedin=htmlHead
if exists('s:current_syntax_save')
let b:current_syntax = s:current_syntax_save
unlet s:current_syntax_save
endif

View file

@ -32,7 +32,7 @@ hi def link coffeeConditional Conditional
syn match coffeeException /\<\%(try\|catch\|finally\)\>/ display syn match coffeeException /\<\%(try\|catch\|finally\)\>/ display
hi def link coffeeException Exception hi def link coffeeException Exception
syn match coffeeKeyword /\<\%(new\|in\|of\|by\|and\|or\|not\|is\|isnt\|class\|extends\|super\|do\|yield\)\>/ syn match coffeeKeyword /\<\%(new\|in\|of\|by\|and\|or\|not\|is\|isnt\|class\|extends\|super\|do\|yield\|debugger\)\>/
\ display \ display
" The `own` keyword is only a keyword after `for`. " The `own` keyword is only a keyword after `for`.
syn match coffeeKeyword /\<for\s\+own\>/ contained containedin=coffeeRepeat syn match coffeeKeyword /\<for\s\+own\>/ contained containedin=coffeeRepeat

View file

@ -859,7 +859,7 @@ function! s:StageUndo() abort
let hash = repo.git_chomp('hash-object', '-w', filename) let hash = repo.git_chomp('hash-object', '-w', filename)
if !empty(hash) if !empty(hash)
if section ==# 'untracked' if section ==# 'untracked'
call repo.git_chomp_in_tree('clean', '--', filename) call repo.git_chomp_in_tree('clean', '-f', '--', filename)
elseif section ==# 'unmerged' elseif section ==# 'unmerged'
call repo.git_chomp_in_tree('rm', '--', filename) call repo.git_chomp_in_tree('rm', '--', filename)
elseif section ==# 'unstaged' elseif section ==# 'unstaged'

View file

@ -6,10 +6,15 @@ IMPROVEMENTS:
buffers as well. This affects all commands where `guru` is used. Such as buffers as well. This affects all commands where `guru` is used. Such as
`:GoDef`, `:GoReferrers`, etc.. [gh-944] `:GoDef`, `:GoReferrers`, etc.. [gh-944]
* Cleanup and improve documentation [gh-987] * Cleanup and improve documentation [gh-987]
* Add new `g:go_gocode_socket_type` setting to change the underlying socket type passed to `gocode`. Usefull to fallback to `tcp` on cases such as Bash on Windows [gh-1000]
* `:GoSameIds` is now automatically re-evaluated in cases of buffer reloads (such as `:GoRename`) [gh-998]
BUG FIXES: BUG FIXES:
* Fix system calls on Windows [gh-988] * Fix system calls on Windows [gh-988]
* Fix :GoSameIds and :GoCoverage for light background and after changing color schemes [gh-983]
* Fix TagBar and `GoCallers` for Windows user [gh-999]
* Set updatetime for for `auto_sameids` feature as well [gh-1016]
## 1.8 (July 31, 2016) ## 1.8 (July 31, 2016)

View file

@ -32,10 +32,17 @@ function! s:gocodeCommand(cmd, preargs, args)
let old_gopath = $GOPATH let old_gopath = $GOPATH
let $GOPATH = go#path#Detect() let $GOPATH = go#path#Detect()
let result = go#util#System(printf('%s %s %s %s', go#util#Shellescape(bin_path), join(a:preargs), go#util#Shellescape(a:cmd), join(a:args))) let socket_type = get(g:, 'go_gocode_socket_type', 'unix')
let cmd = printf('%s -sock %s %s %s %s',
\ go#util#Shellescape(bin_path),
\ socket_type,
\ join(a:preargs),
\ go#util#Shellescape(a:cmd),
\ join(a:args)
\ )
let result = go#util#System(cmd)
let $GOPATH = old_gopath let $GOPATH = old_gopath
if go#util#ShellError() != 0 if go#util#ShellError() != 0
return "[\"0\", []]" return "[\"0\", []]"
else else

View file

@ -1,6 +1,5 @@
" guru.vim -- Vim integration for the Go guru. " guru.vim -- Vim integration for the Go guru.
func! s:RunGuru(mode, format, selected, needs_scope) range abort func! s:RunGuru(mode, format, selected, needs_scope) range abort
"return with a warning if the binary doesn't exist "return with a warning if the binary doesn't exist
let bin_path = go#path#CheckBinPath("guru") let bin_path = go#path#CheckBinPath("guru")
@ -364,6 +363,12 @@ function! go#guru#SameIds(selected)
let pos = split(item, ':') let pos = split(item, ':')
call matchaddpos('goSameId', [[str2nr(pos[-2]), str2nr(pos[-1]), str2nr(poslen)]]) call matchaddpos('goSameId', [[str2nr(pos[-2]), str2nr(pos[-1]), str2nr(poslen)]])
endfor endfor
if get(g:, "go_auto_sameids", 0)
" re-apply SameIds at the current cursor position at the time the buffer
" is redisplayed: e.g. :edit, :GoRename, etc.
autocmd BufWinEnter <buffer> nested call go#guru#SameIds(-1)
endif
endfunction endfunction
function! go#guru#ClearSameIds() function! go#guru#ClearSameIds()
@ -373,6 +378,11 @@ function! go#guru#ClearSameIds()
call matchdelete(item['id']) call matchdelete(item['id'])
endif endif
endfor endfor
" remove the autocmds we defined
if exists("#BufWinEnter<buffer>")
autocmd! BufWinEnter <buffer>
endif
endfunction endfunction
function! go#guru#ToggleSameIds(selected) function! go#guru#ToggleSameIds(selected)

View file

@ -59,7 +59,7 @@ function! go#package#ImportPath(arg)
let dirs = go#package#Paths() let dirs = go#package#Paths()
for dir in dirs for dir in dirs
if len(dir) && match(path, dir) == 0 if len(dir) && matchstr(escape(path, '\/'), escape(dir, '\/')) == 0
let workspace = dir let workspace = dir
endif endif
endfor endfor
@ -68,8 +68,13 @@ function! go#package#ImportPath(arg)
return -1 return -1
endif endif
let srcdir = substitute(workspace . '/src/', '//', '/', '') if go#util#IsWin()
return substitute(path, srcdir, '', '') let srcdir = substitute(workspace . '\src\', '//', '/', '')
return path[len(srcdir):]
else
let srcdir = substitute(workspace . '/src/', '//', '/', '')
return substitute(path, srcdir, '', '')
endif
endfunction endfunction
function! go#package#FromPath(arg) function! go#package#FromPath(arg)

View file

@ -1387,6 +1387,13 @@ Specifies whether `gocode` should add built-in types, functions and constants
to an autocompletion proposals. By default it is enabled. to an autocompletion proposals. By default it is enabled.
> >
let g:go_gocode_propose_builtins = 1 let g:go_gocode_propose_builtins = 1
<
*'g:go_gocode_socket_type'*
Specifies whether `gocode` should use a different socket type. By default
`unix` is enabled. Possible values: `unix`, `tcp`
>
let g:go_gocode_socket_type = 'unix'
< <
*'g:go_template_autocreate'* *'g:go_template_autocreate'*

View file

@ -56,7 +56,7 @@ if get(g:, "go_textobj_enabled", 1)
xnoremap <buffer> <silent> [[ :<c-u>call go#textobj#FunctionJump('v', 'prev')<cr> xnoremap <buffer> <silent> [[ :<c-u>call go#textobj#FunctionJump('v', 'prev')<cr>
endif endif
if get(g:, "go_auto_type_info", 0) if get(g:, "go_auto_type_info", 0) || get(g:, "go_auto_sameids", 0)
setlocal updatetime=800 setlocal updatetime=800
endif endif

View file

@ -45,7 +45,7 @@ function! s:SetTagbar()
\ 'ctype' : 't', \ 'ctype' : 't',
\ 'ntype' : 'n' \ 'ntype' : 'n'
\ }, \ },
\ 'ctagsbin' : expand(bin_path), \ 'ctagsbin' : bin_path,
\ 'ctagsargs' : '-sort -silent' \ 'ctagsargs' : '-sort -silent'
\ } \ }
endif endif

View file

@ -366,13 +366,27 @@ if g:go_highlight_build_constraints != 0
hi def link goPackageComment Comment hi def link goPackageComment Comment
endif endif
" :GoSameIds
hi def goSameId term=bold cterm=bold ctermbg=white ctermfg=black
" :GoCoverage commands " :GoCoverage commands
hi def link goCoverageNormalText Comment hi def link goCoverageNormalText Comment
hi def goCoverageCovered ctermfg=green guifg=#A6E22E
hi def goCoverageUncover ctermfg=red guifg=#F92672 function! s:hi()
" :GoSameIds
if &background == 'dark'
hi def goSameId term=bold cterm=bold ctermbg=white ctermfg=black guibg=white guifg=black
else
hi def goSameId term=bold cterm=bold ctermbg=14 guibg=Cyan
endif
" :GoCoverage commands
hi def goCoverageCovered ctermfg=green guifg=#A6E22E
hi def goCoverageUncover ctermfg=red guifg=#F92672
endfunction
augroup vim-go-hi
autocmd!
autocmd ColorScheme * call s:hi()
augroup end
call s:hi()
" Search backwards for a global declaration to start processing the syntax. " Search backwards for a global declaration to start processing the syntax.
"syn sync match goSync grouphere NONE /^\(const\|var\|type\|func\)\>/ "syn sync match goSync grouphere NONE /^\(const\|var\|type\|func\)\>/

View file

@ -5,7 +5,9 @@ global !p
def ada_case(word): def ada_case(word):
out = word[0].upper() out = word[0].upper()
for i in range(1, len(word)): for i in range(1, len(word)):
if word[i - 1] == '_': if word[i] == '-':
out = out + '.'
elif word[i - 1] == '_' or word[i - 1] == '-':
out = out + word[i].upper() out = out + word[i].upper()
else: else:
out = out + word[i] out = out + word[i]

View file

@ -3,7 +3,7 @@ extends c
## ##
## Preprocessor ## Preprocessor
# #include <...> # #include <...>
snippet inc snippet incc
#include <${1:iostream}> #include <${1:iostream}>
snippet binc snippet binc
#include <boost/${1:shared_ptr}.hpp> #include <boost/${1:shared_ptr}.hpp>