GithubHelp home page GithubHelp logo

lebje / coc-sourcekit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from klaaspieter/coc-sourcekit

0.0 1.0 0.0 78 KB

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

License: MIT License

JavaScript 73.67% TypeScript 26.33%

coc-sourcekit's Introduction

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 which 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 []
sourcekit.env Environment variables to pass to the lsp. {}

Environment Variables

You can configure SourceKit's logging and toolchain path through sourcekit.env:

"sourcekit.env": {
	"SOURCEKIT_TOOLCHAIN_PATH": "/home/USER/swift-DEVELOPMENT-SNAPSHOT-2021-07-30-a-ubuntu20.04/",
	"SOURCEKIT_LOGGING": "3" // verbose logging
}

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

coc-sourcekit's People

Contributors

dependabot[bot] avatar keith avatar klaaspieter avatar lebje avatar supermarin avatar zoho-gold avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.