Releases: swift-emacs/swift-mode
Fix indentation of switch-case
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
- Highlight
#filePath
- Support multi-parttern catch clauses
- Fix unreadable characters appearing in REPL prompt
Fix indentation of generic parameters
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
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
- 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]*
wherecmd-string
is the command name such asswift
- Fixes
beginning-of-defun
hanging at the beginning of buffer - Updates highlighting of class names for Swift 5.0
Raw string literal
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
This is a minor fix for swift-mode:mark-defun
and swift-mode:mark-sentence
.
Emacs 26 style mark-defun
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
- 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
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!