Skip to content

dengcqw/sourcekittendaemon.vim

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SourceKittenDaemon.vim

This plugin provides vim integration with SourceKittenDaemon. This means you can have autocomplete for Swift projects in vim.

This plugin uses the normal 'omnifunc' infrastructure. By default completion is mapped to <C-x><C-o>. See :help 'omnifunc' for more information.

Limitations

  • SourceKittenDaemon doesn't yet provide support for xcworkspaces
  • This plugin doesn't do anything about completion tokens (meaning you can't do <TAB> to jump between args as you do in Xcode)
  • Currently completion only seems to work after dots
  • Currently you cannot configure the port used with SourceKittenDaemon, use the default 8081.

Installation

Install and setup SourceKittenDaemon.

If you don't have a preferred plugin installation method, check out vim-plug.

NOTE: This plugin doesn't provide Swift runtime files. If you'd like those checkout swift.vim

additional improvement by dengcqw

  • complete for "("
  • pass string before dot to server for cache
  • skip if there are blanks between dot or "(" with cursor
  • jump to placeholder, and to remove patten "<#>"

Tips if set g:ycm_semantic_triggers for swift in vimrc, we can enjoy YCM.
I also fork [SourceKittenDaemon][https://github.com/terhechte/SourceKittenDaemon] to add cache and sort result

About

Autocomplete Swift in Vim

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Vim Script 82.0%
  • Python 18.0%