Unknown function: autocomplete_swift#jump_to_placeholder
Hi,
I'm getting this error when running (i.e. <C-K> on insert mode):
Error detected while processing /Users/pedrofranceschi/.dot/vim/plugged/autocomplete-swift/autoload/autocomplete_swift.vim:
line 13:
E122: Function <SNR>118_get_xcode_toolchain already exists, add ! to replace it
Press ENTER or type command to continue
E117: Unknown function: autocomplete_swift#jump_to_placeholder
Press ENTER or type command to continue
E15: Invalid expression: autocomplete_swift#jump_to_placeholder()
Press ENTER or type command to continue
I have no other functions named "s:118_get_xcode_toolchain", plus "autocomplete_swift#jump_to_placeholder" is declared on the plugin itself. I'm loading the plugin and deoplete with Plug:
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
Plug 'mitsuse/autocomplete-swift'
SourceKitten, Neovim and Python are installed and working. Neovim:
:version
NVIM 0.1.7
Build type: RelWithDebInfo
Compilation: /usr/local/Homebrew/Library/Homebrew/shims/super/clang -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2 -g -DDISABLE_LOG -Wall -Wextra -pedantic -Wno-unused-pa
rameter -Wstrict-prototypes -std=gnu99 -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -DHAVE_CONFIG_H -I/tmp/neovim-20161201-87907-4t6ro
1/neovim-0.1.7/build/config -I/tmp/neovim-20161201-87907-4t6ro1/neovim-0.1.7/src -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/
include -I/usr/local/opt/gettext/include -I/usr/include -I/usr/include -I/tmp/neovim-20161201-87907-4t6ro1/neovim-0.1.7/build/src/nvim/auto -I/tmp/neovim-20161201-87907-4t6ro1/ne
ovim-0.1.7/build/include
Compiled by [email protected]
Optional features included (+) or not (-): +acl +iconv -jemalloc +tui
For differences from Vim, see :help vim-differences
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/usr/local/Cellar/neovim/0.1.7/share/nvim"
Press ENTER or type command to continue
Any idea why I get this error? Thanks!
@pedrofranceschi Thanks for reporting and sorry, it is a bug. I released the fixed version just now, please update the plugin.
Thanks for the quick update! Now I don't get any errors, but neither I get the autocomplete menu on <C-K>. Nothing happens.
@pedrofranceschi
Please tell me the following two things:
- Is
<C-K>bound to<Plug>autocomplete_swift_jump_to_placeholder? - What do placeholders look like?
Thanks.
Actually, neither <C-K> (which is bound to <Plug>autocomplete_swift_jump_to_placeholder) nor the regular autocomplete is working. I have a UIViewController subclass and when completing self.xxx only shows previously used methods in the autocomplete, and none of the possible instance methods for a UIViewController (i.e. the plugin seems not to use SourceKitten to generate completion results):
Please let me know if you need anything else. Thanks!
@pedrofranceschi
The file is contained in an Xcode project which implements ViewController, isn't it? Autocomplete-swift supports completion only on a single file or file managed in SPM project. If your file is managed with Xcode, completion works on the context of the file.
Completion on Xcode project was experimentally supported in previous release, but the feature was dropped because the completion server has bugs.
<C-K> can be used to jumpt to placeholders like <1:Int> or <#T##Int#>.
If you have other questions/issue, please open a new issue. Thanks!