I am trying to write a plugin, where the `b:Sdir` will take the directories with source code. I am trying to achieve autocompletion as:
"MakeMake: Generate Makefile.gen
function! MakeMake()
let b:Rdir = input("Project root folder: ", ".", 'file')
exe ":lchdir ".b:Rdir
" More than 1 files can be choosed
let b:Sdir = input("Choose source dir: ", ".", "customlist,CFile")
endfunction
function! CFile(A,L,P)
return split(globpath(b:Rdir, a:A),"\n")
endfunction
But this is not working.
As normal, if I use "split(globpath(b:Rdir, "*"),"\n")" in CFile, it will show ALL files in the directory available, but not filter the files.
How can I achieve completion for this?