mirror of
https://github.com/amix/vimrc
synced 2025-06-24 07:44:59 +08:00
Updated vimrc
This commit is contained in:
@ -10,7 +10,7 @@
|
||||
"
|
||||
"============================================================================
|
||||
|
||||
if exists("g:loaded_syntastic_lua_luac_checker")
|
||||
if exists('g:loaded_syntastic_lua_luac_checker')
|
||||
finish
|
||||
endif
|
||||
let g:loaded_syntastic_lua_luac_checker = 1
|
||||
@ -21,7 +21,7 @@ set cpo&vim
|
||||
function! SyntaxCheckers_lua_luac_GetHighlightRegex(pos)
|
||||
let result = ''
|
||||
let near = matchstr(a:pos['text'], '\mnear ''\zs[^'']\+\ze''')
|
||||
if near != ''
|
||||
if near !=# ''
|
||||
if near ==# '<eof>'
|
||||
let p = getpos('$')
|
||||
let a:pos['lnum'] = p[1]
|
||||
|
@ -9,7 +9,7 @@
|
||||
" See http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
"============================================================================
|
||||
|
||||
if exists("g:loaded_syntastic_lua_luacheck_checker")
|
||||
if exists('g:loaded_syntastic_lua_luacheck_checker')
|
||||
finish
|
||||
endif
|
||||
let g:loaded_syntastic_lua_luacheck_checker = 1
|
||||
@ -19,27 +19,27 @@ set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_lua_luacheck_GetHighlightRegex(item)
|
||||
let term = matchstr(a:item['text'], '\m''\zs\S\+\ze''')
|
||||
if term != ''
|
||||
if term !=# ''
|
||||
return '\V\<' . escape(term, '\') . '\>'
|
||||
endif
|
||||
|
||||
let term = matchstr(a:item['text'], '\m\(accessing undefined\|setting non-standard global\|' .
|
||||
\ 'setting non-module global\|unused global\) variable \zs\S\+')
|
||||
if term == ''
|
||||
if term ==# ''
|
||||
let term = matchstr(a:item['text'], '\mvariable \zs\S\+\ze was previously defined')
|
||||
endif
|
||||
if term == ''
|
||||
if term ==# ''
|
||||
let term = matchstr(a:item['text'], '\munused \(variable\|argument\|loop variable\) \zs\S\+')
|
||||
endif
|
||||
if term == ''
|
||||
if term ==# ''
|
||||
let term = matchstr(a:item['text'], '\m\(value assigned to variable\|value of argument\|' .
|
||||
\ 'value of loop variable\) \zs\S\+')
|
||||
endif
|
||||
if term == ''
|
||||
if term ==# ''
|
||||
let term = matchstr(a:item['text'], '\mvariable \zs\S\+\ze is never set')
|
||||
endif
|
||||
|
||||
return term != '' ? '\V\<' . escape(term, '\') . '\>' : ''
|
||||
return term !=# '' ? '\V\<' . escape(term, '\') . '\>' : ''
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_lua_luacheck_GetLocList() dict
|
||||
|
Reference in New Issue
Block a user