# coc-sourcekit

> sourcekit extension for coc

Latest version **0.0.3** (published 2020-11-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install coc-sourcekit
pnpm add coc-sourcekit
yarn add coc-sourcekit
bun add coc-sourcekit
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2020-11-13 |
| First published | 2020-01-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 8.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 72 |
| Author | Klaas Pieter Annema |
| Maintainers | kpa |
| Keywords | coc.nvim, languageserver, swift, vim, neovim |

## Links

- npm: https://www.npmjs.com/package/coc-sourcekit
- Repository: https://github.com/klaaspieter/coc-sourcekit
- npm.io page: https://npm.io/package/coc-sourcekit

## Dependencies (1)

- [tslib](https://npm.io/package/tslib.md) ^1.9.3

## Recent versions

- 0.0.3 (latest) — 2020-11-13
- 0.0.2 — 2020-02-17
- 0.0.1 — 2020-01-09

## README

# coc-sourcekit

Sourcekit language server extension for [coc].

[coc]: https://github.com/neoclide/coc.nvim

## Install

In vim or neovim, run command:

```sh
:CocInstall coc-sourcekit
```
## Features

See [sourcekit-lsp].

[sourcekit-lsp]: https://github.com/apple/sourcekit-lsp


## Configuration options

|Key|Description|Default|
|----|------------|-----|
|`sourcekit.enable`|Enable sourcekit extension|true|
|`sourcekit.commandPath`|Path to sourcekit-lsp binary|Output of `xcrun --find sourcekit-lsp`|
|`sourcekit.trace.server`|Trace the communication between coc and the sourcekit language server|
|`sourcekit.sdkPath`|The path to the desired SDK|Nothing|
|`sourcekit.sdk`|The name to the desired SDK to be fetched|Nothing|
|`sourcekit.targetArch`| The name of the target (e.g x86_64-apple-ios13.2-simulator) to generate code |
|`sourcekit.args`|Extra arguments to pass to the lsp|[]|

## 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`](.env) is provided which allows for tailing the logs outside of vim:

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

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

Or source it [automatically](https://github.com/klaaspieter/dotfiles/blob/5c2c1a6fa1a6f9ccc9031c3dc8de2ea9a3c4fdb0/zshrc#L327-L334).

[`:CocOpenLog`]: https://github.com/neoclide/coc.nvim/blob/db5ffd2ff0d766c2cfbd711898e8a3f5736e038c/doc/coc.txt#L1659

## Acknowledgements

- [josa42] for [coc-go] and [coc-sh]. This repo started out as a copy of [coc-go] and I used [coc-sh] as a reference implementation.

[josa42]: https://github.com/josa42
[coc-go]: https://github.com/josa42/coc-go
[coc-sh]: https://github.com/josa42/coc-sh

---
_Source: https://npm.io/package/coc-sourcekit · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
