- The support for completion on SPM-based project is added.
- Autocompletion-swift droped support for Vim and completion with omni-function. Please use this plugin in NeoVim with deoplete.nvim.
Please execute the following commands:
$ brew install sourcekitten $ pip install pyyaml
To install autocomplete-swift,
it is recommended to use plugin manager such as dein.vim.
In the case of dein.vim, please add the following codes into
init.vim and configure them:
call dein#add('Shougo/deoplete.nvim') call dein#add('mitsuse/autocomplete-swift')
This plugin also supports jumping to placeholders in arguments of method. The following configuration is required:
" Jump to the first placeholder by typing `<C-k>`. autocmd FileType swift imap <buffer> <C-k> <Plug>(autocomplete_swift_jump_to_placeholder)
If your vim setup doesn't set
you need to put this line in your config:
autocmd BufNewFile,BufRead *.swift set filetype=swift
Autocomplete-swift supports types of completion as follow:
- Type name
- Type/Instance member
- Function/method/initializer parameter
- Top-level function/constant/variable
- Keyword such as
- Method definition
This plugin supports jumping to placeholders in arguments of method. Please read Installation.
The custom toolchain is available for completion.
For example, if you want to use Swift 4.2,
Support for Swift Package Manager (SPM)
When you are editing a file managed with SPM, autocomplete-swift enables SPM-based completion. It means that you can obtain candidates which come from dependencies (other files or libraries).
Xcode Project Support
The previous version supported completion with framework/SDK experimentally, but the feature is removed because the completion server has fatal bugs.
- Make configurable. For example, autocomplete-swift will get
max_candiatesfor deoplete from a variable.
In the GIF on the beginning, I use snippets for Swift contained in neosnippet-snippets in addition to autocomplete-swift.
Please read LICENSE.