c syntax_checker: add support for glade
This commit is contained in:
parent
bd93029eb9
commit
101955648e
@ -41,6 +41,7 @@ function! s:Init()
|
||||
call s:RegHandler('\%(gtk\|glib\)', s:CheckGtk())
|
||||
call s:RegHandler('ruby', s:CheckRuby())
|
||||
call s:RegHandler('Python\.h', s:CheckPython())
|
||||
call s:RegHandler('glade', s:CheckGlade())
|
||||
|
||||
unlet! s:RegHandler
|
||||
endfunction
|
||||
@ -154,6 +155,19 @@ function! s:CheckPython()
|
||||
return ''
|
||||
endfunction
|
||||
|
||||
" try to find the glade headers with 'pkg-config'
|
||||
function! s:CheckGlade()
|
||||
if executable('pkg-config')
|
||||
if !exists('s:glade_flags')
|
||||
let s:glade_flags = system('pkg-config --cflags libglade-2.0')
|
||||
let s:glade_flags = substitute(s:glade_flags, "\n", '', '')
|
||||
let s:glade_flags = ' ' . s:glade_flags
|
||||
endif
|
||||
return s:glade_flags
|
||||
endif
|
||||
return ''
|
||||
endfunction
|
||||
|
||||
" return a handler dictionary object
|
||||
function! s:RegHandler(regex, function)
|
||||
let handler = {}
|
||||
|
Loading…
Reference in New Issue
Block a user