Skip to content

Releases: swift-emacs/swift-mode

Fix indentation of switch-case

01 Oct 11:10
Compare
Choose a tag to compare

If swift-mode:switch-case-offset is equal to or greater than swift-mode:basic-offset, the body of switch statements are indented to swift-mode:switch-case-offset + swift-mode:basic-offset.

Before:

switch foo {
      case 1:
    print(1)
      default:
    print("other")
}

After:

switch foo {
      case 1:
          print(1)
      default:
          print("other")
}

Thanks @woolsweater .

Swift 5.3 and REPL fix

20 Sep 06:48
Compare
Choose a tag to compare

Fix indentation of generic parameters

18 Apr 06:23
Compare
Choose a tag to compare

Fixed indentation of generic parameters.

Example:

struct Foo<
  A: A,
  A: A, A: A
> {
}

Added some keyword of Swift 5.1.

Other small fixes.

Fix indentation after `class` modifier

09 Jun 05:24
Compare
Choose a tag to compare

Fix indentation after class token used as a modifier:

class Foo {
  public
    class
    var
    foo = 1
}

Trivia:

class Foo {
  // Nested class named "final"
  class final {
  }

  // Non-overridable class method named "foo"
  class final func foo() {
  }
}

Improved Imenu and consistent behavior in multiline comments

25 May 06:30
Compare
Choose a tag to compare
  • Improved Imenu and speedbar support
  • More consistent electric indents and adaptive-fills inside multiline comments
  • Chooses right executables for REPL, debugger, and other build tools
  • The buffer name of REPL is now *Swift REPL [cmd-string]* where cmd-string is the command name such as swift
  • Fixes beginning-of-defun hanging at the beginning of buffer
  • Updates highlighting of class names for Swift 5.0

Raw string literal

08 Dec 07:51
Compare
Choose a tag to compare

Adds support for raw string literal of Swift 5. For example: #"c:\windows\system32"#.

This release also enchances the hilighting of compiler directives.

Fix mark-defun

13 Oct 10:09
Compare
Choose a tag to compare

This is a minor fix for swift-mode:mark-defun and swift-mode:mark-sentence.

Emacs 26 style mark-defun

30 Sep 09:25
Compare
Choose a tag to compare

swift-mode:mark-defun and swift-mode:mark-sentence now take a numeric argument. It repeats that count. If the count is negative, reverse direction.

Improved font-lock

22 Jul 10:17
Compare
Choose a tag to compare
  • More comprehensive and consistent highlighting of symbols in standard library.
  • Highlighting symbols in standard library is now optional.

Debug on iOS device and improved font-lock

11 Jun 05:10
Compare
Choose a tag to compare

Now you can debug iOS apps on your device with ios-deploy. Install ios-deploy, set exec-path, run swift-mode:debug-ios-app, and choose Local device.

font-lock is improved and now customizable. Run customize-group with swift-mode:faces.

Most of those improvements are contributed by @msanders (Michael Sanders). Thanks!