Git Product home page Git Product logo

vscode-swift's Introduction

Swift for Visual Studio Code

An extension for VS Code which provides support for the Swift language, providing the following:

  • Completion Lists
  • Signature Help
  • Snippets
  • Quick Info
  • Goto Definition

Please note that this extension will ONLY work with Swift Package Manager projects for the time being. If a Package.swift file is not in the root of your project, this extension will fail.

Also note, this is an early beta release. There will be bugs. Please file any issues you run into over here: https://github.com/owensd/vscode-swift.

Installation

Obviously, you'll need to have Visual Studio Code installed. Then search for the Swift for Visual Studio Code extension from the command palette (cmd+shift+p|ctrl+shift+p).

You'll need to ensure that the swift tool is on your command path is one of the supported versions. As of now, only Swift 3.1 is supported. If you are using development snapshots, you can configure your project to use the correct version of Swift with the `swift-langsrv.

Note: It is entirely possible to use development snapshots. However, they are untested and unsupported. The problem is that the SourceKit binary may simply not load for mis-matched versions of Swift.

swift.toolchainPath - the path to the root of the Swift toolchain, for example: /Library/Developer/Toolchains/swift-3.1.1-RELEASE.xctoolchain

macOS

If you have the correct version of Swift installed, there is no other action necessary as all of the dependencies are installed for you.

Linux (in progress)

The fundamental problem is Swift 3.1 does not build with SourceKit... this is being addressed in Swift 4. There are workarounds that I will published within the next few releases.

Windows Linux Subsystem (experimental)

This setup is identical as the Linux setup with the exception of some additional Visual Studio Code setup that is required. For one, the default shell needs to point to C:\Windows\sysnative\bash.exe. This should be enough to get you going, but your mileage may vary here. In later versions, this will be more flushed out as there are still reliability issues with swift itself in this environment.

Swift JIRA Bug Links

The extension also provides easy hot-links to any of the Swift bugs with a specially crafted comment // SwiftBug(SR-2688). You can disable this feature with the kiad.swift.enableSwiftBugLinks setting.

License

MIT

vscode-swift's People

Contributors

owensd 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.