swift-mode

Emacs support for Apple's Swift programming language.

GPL-3.0 License

Stars
363
swift-mode - Add current-defun-name

Published by taku0 over 6 years ago

which-function-mode and add-change-log-entry work as expected now.

Fixes handling of unmatched parenthesis.

swift-mode - Fix beginning/end-of-sentence

Published by taku0 almost 7 years ago

Added tests and fixed beginning/end-of-sentence.

swift-mode - Sentences, comments, and defuns

Published by taku0 almost 7 years ago

Added beginning-of/end-of/mark/narrow-to/kill-sentence. A sentence is a statement outside strings or comments. Inside strings or comments, it indicates ordinal sentence.

Handling of comments and defuns are improved. Declarations other than functions are now defun.

swift-mode - Improved comments and defuns

Published by taku0 about 7 years ago

Added comment style option.

Now we can choose multiline comment styles.

Java style:

/**
 * Foo
 * Bar
 */

Swift Quick Help style:

/**
 Foo
 Bar
 */

https://developer.apple.com/library/content/documentation/Xcode/Reference/xcode_markup_formatting_ref/index.html

Quick Help style is the default.

Single line comment now inherits spaces from the previous line.

/// - aaa
///   - bbb // When M-j (indent-new-comment-line) is pressed here,
///   // triple spaces will be inserted after slashes.

Improved functions related to defuns. More robust and sensible behaviors.

swift-mode - Multiline strings with interpolation

Published by taku0 about 7 years ago

Supports multiline strings with interpolation:

let x = """
  The quick brown \(
    fox()
  ) jumps over the lazy \(
    dog()
  )
  """
swift-mode - Add build/debug command

Published by taku0 over 7 years ago

Added commands to build/debug Swift modules/iOS apps.

See swift-mode:build-swift-module, swift-mode:build-ios-app, swift-mode:debug-swift-module, and swift-mode:debug-ios-app.

swift-mode - Fix indentation for catch block

Published by taku0 over 7 years ago

swift-mode - Better indent-new-comment

Published by taku0 over 7 years ago

swift-mode:indent-new-comment-line (M-j or C-M-j) now inhertis slashes from the previous line. Example:

/// Some documentation comment
///
/// Typing M-j here will insert three slashes on the next line instead of two.
swift-mode - Fix indentation for keywords used as parameter names

Published by taku0 over 7 years ago

The following code is now correctly indented.

foo(
  in: 1
)

foo(
  where: 1
)
swift-mode - Fix REPL prompt corruption

Published by taku0 almost 8 years ago

swift-mode - Highlights anchor and bug fixes

Published by taku0 about 8 years ago

If swift-mode:highlight-anchor is non-nil, the anchor point is highlighted when indenting a line. For example, when indenting the aaa token in the following example, the character “c” of the token class is highlighted because the aaa token is indented relative to the character.

class Foo {
    aaa
}

This feature is disabled by default because it is intended for debugging.

swift-mode - New indentation logic

Published by taku0 about 8 years ago

New indentation logic.

Note flycheck is moved to https://github.com/swift-emacs/flycheck-swift.

Package Rankings
Top 6.74% on Proxy.golang.org
Badges
Extracted from project README
License GPL 3 Run Tests MELPA MELPA
Related Projects