fix autocompletion on 2.7
This commit is contained in:
parent
b3c9ba0f9f
commit
758847aaab
@ -11,18 +11,19 @@ if !exists("g:symfony_enable_shell_mapping")
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
fun! CompleteSymfonyContainer(base, res)
|
fun! CompleteSymfonyContainer(base, res)
|
||||||
let shellcmd = g:symfony_app_console_caller. ' '.g:symfony_app_console_path.' container:debug'
|
let shellcmd = g:symfony_app_console_caller. ' '.g:symfony_app_console_path.' debug:container'
|
||||||
let output = system(shellcmd)
|
let output = system(shellcmd)
|
||||||
if v:shell_error
|
if v:shell_error
|
||||||
|
echo output
|
||||||
return 0
|
return 0
|
||||||
endif
|
endif
|
||||||
|
|
||||||
for m in split(output, "\n")
|
for m in split(output, "\n")
|
||||||
let row = split(m)
|
let row = split(m)
|
||||||
if len(row) == 3
|
if len(row) == 2
|
||||||
let [service, scope, class] = row
|
let [service, class] = row
|
||||||
if service =~ '^' . a:base
|
if service =~ '^' . a:base
|
||||||
let menu = 'scope: '. scope .', class: '. class
|
let menu = 'class: '. class
|
||||||
call add(a:res, { 'word': service, 'menu': menu })
|
call add(a:res, { 'word': service, 'menu': menu })
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
@ -30,9 +31,10 @@ fun! CompleteSymfonyContainer(base, res)
|
|||||||
endfun
|
endfun
|
||||||
|
|
||||||
fun! CompleteSymfonyRouter(base, res)
|
fun! CompleteSymfonyRouter(base, res)
|
||||||
let shellcmd = g:symfony_app_console_caller. ' '.g:symfony_app_console_path.' router:debug'
|
let shellcmd = g:symfony_app_console_caller. ' '.g:symfony_app_console_path.' debug:router'
|
||||||
let output = system(shellcmd)
|
let output = system(shellcmd)
|
||||||
if v:shell_error
|
if v:shell_error
|
||||||
|
echo output
|
||||||
return 0
|
return 0
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user