Major-mode for Apple's Swift programming language. Provides:
- syntax highlighting
- indentation
- code navigation with imenu
- automatic syntax checking with flycheck (disabled by default)
This is currently at an early stage of development and there's plenty of work to do. Check the issue tracker.
Requires Emacs 24 or later.
swift-mode can be installed using Emacs' built-in package manager or from
source. You can also install flycheck if you want syntax checking.
You can install a snapshot version of swift-mode from the MELPA
repository. The version of swift-mode there will always be up-to-date, but it
might be unstable (albeit rarely).
You can add MELPA to the list of package.el repositories like this:
(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/"))You can install the last stable version of swift-mode from the
MELPA Stable repository.
You can add MELPA Stable to the list of package.el repositories like this:
(add-to-list 'package-archives '("melpa-stable" . "http://melpa-stable.milkbox.net/packages/"))The package installation is as easy as:
M-x package-install swift-mode
If you'd like to get on-the-fly syntax checking you should install flycheck as well:
M-x package-install flycheck
And enable flycheck checker for swift:
(add-to-list 'flycheck-checkers 'swift)
You will need make and Cask to build the project.
cd swift-mode
make && make install
This will install swift-mode via package.el locally.
You can also install swift-mode the old-school way by simply dropping it
somewhere on your load-path.
(add-to-list 'load-path "~/emacs.d/vendor")
(require 'swift-mode)Yes, please do! See CONTRIBUTING for guidelines.
The REPL code is based on js-comint.
Thanks to the following users for their contributions:
- @ap4y (Arthur Evstifeev)
- @bbatsov (Bozhidar Batsov)
- @ckruse (Christian Kruse)
- @syohex (Syohei Yoshida)
See COPYING. Copyright (c) 2014 Chris Barrett.
