Skip to content

Swift language server extension using sourcekit-lsp for coc.nvim.

License

Notifications You must be signed in to change notification settings

keith/coc-sourcekit

 
 

Repository files navigation

coc-sourcekit

Sourcekit language server extension for coc.

Install

In vim or neovim, run command:

:CocInstall coc-sourcekit

Features

See sourcekit-lsp.

Configuration options

Key Description Default
sourcekit.enable Enable sourcekit extension true
sourcekit.commandPath Path to sourcekit-lsp binary Output of xcrun --toolchain swift --find sourcekit-lsp
sourcekit.trace.server Trace the communication between coc and the sourcekit language server
sourcekit.iOSsdkPath The path to the desired iOS SDK Output of xcrun --sdk iphonesimulator --show-sdk-path)
sourcekit.targetArch The name of the target (e.g x86_64-apple-ios13.2-simulator) to generate code

Development

  1. Run yarn build or yarn build:watch
  2. Run yarn run link:add to link extension
  3. Open a Swift file in vim

To see that it worked use :CocOpenLog.

Alternatively a .env is provided which allows for tailing the logs outside of vim:

# In the split/tab you will open vim
source .env

# In another split/tab
tail -f coc.log

Or source it automatically.

Acknowledgements

About

Swift language server extension using sourcekit-lsp for coc.nvim.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 54.8%
  • TypeScript 43.7%
  • Shell 1.5%