Flycheck extension for Apple's Swift programming language.
Install flycheck-swift
package from MELPA.
Add the following line to the ~/.emacs.d/init.el
or ~/.emacs
.
(eval-after-load 'flycheck '(flycheck-swift-setup))
If you compile against iOS SDK, add the following lines:
(setq flycheck-swift-sdk-path "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk")
;; ↑ Select the appropriate SDK version you use
(setq flycheck-swift-target "arm64-apple-ios10")
Install Flycheck.
git clone --depth 1 https://github.com/swift-emacs/flycheck-swift.git
cd flycheck-swift
emacs --batch -l package -f package-initialize --eval '(package-install-file "flycheck-swift.el")'
Add the following line to the ~/.emacs.d/init.el
or ~/.emacs
.
(eval-after-load 'flycheck '(flycheck-swift-setup))
If you compile against iOS SDK, add the following lines:
(setq flycheck-swift-sdk-path "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk")
;; ↑ Select the appropriate SDK version you use
(setq flycheck-swift-target "arm64-apple-ios10")
Install cask.
git clone https://github.com/swift-emacs/flycheck-swift.git
cd flycheck-swift
make install
Add the following line to the ~/.emacs.d/init.el
or ~/.emacs
.
(eval-after-load 'flycheck '(flycheck-swift-setup))
If you compile against iOS SDK, add the following lines:
(setq flycheck-swift-sdk-path "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk")
;; ↑ Select the appropriate SDK version you use
(setq flycheck-swift-target "arm64-apple-ios10")
The name of the executable, i.e. swiftc
.
Extra flags prepended to arguments of swiftc.
A name of the targeted SDK or path to the targeted SDK.
A list of source file paths to link against. Each path can be glob, i.e. *.swift
.
A list of framework search paths.
A list of include file search paths to pass to the Objective-C compiler.
Target used by swift compiler.
Objective C header file to import.
GPLv3. See COPYING for details. Copyright (C) 2014-2016 taku0, Chris Barrett, Bozhidar Batsov, Arthur Evstifeev.