Noctule 3.0 adds support for Objective-C and improves the existing support for Swift.
Refer to the detailed changelog for the full list; a summary of the changes is below.
Objective-C Support#
Noctule now supports the Objective-C language. Few new projects start in Objective-C, but most established Apple codebases still contain plenty of it. Besides, it was fun to work on new language support 🙂.
Thanks to Apple’s SourceKit-LSP under the hood, features like code completion, navigation and find usages work in Objective-C right away.
Objective-C support requires a license — the free 7-day trial lets you try it first.
Available Features#
- Parsing and syntax highlighting
- Most Objective-C (and also C) source code should be parsed without errors. Complex preprocessor usage can still result in incorrectly shown syntax errors in an editor, though.
- Because other plugins like JetBrains’ C/C++ support also support
*.hfiles Noctule displays a notification to help you reassign when needed. Unfortunately, the platform lacks better support for such setups. - By default, Noctule assigns
*.mand*.hto its Objective-C file type. You can assign*.cfiles, too, if you’d like to edit C source code with SourceKit-LSP. - Code formatting
- Code formatting is available for Objective-C as a native, built-in formatter. It already provides many formatting settings, similar to what AppCode and CLion support. External code formatters like
clang-formatare not yet supported. Let us know if you want it. - Code folding
- Most types of code blocks can be folded to help working with large files.
- Spellchecking
- Noctule supports spellchecking in comments and string literals of Objective-C and integrates with the JetBrains spellchecking plugin.
- Language injection
- Language injection including “Edit fragment…” support is available for
"literals"and@"literals". - Text escape handling
- Pasting text from the clipboard into an Objective-C string literal automatically escapes the pasted content to keep the literal valid code. The same escape handling is also used for language injection.
- Copyright support
- Copyright headers in Objective-C files are supported with the JetBrains Copyright plugin.
- Join lines and split line
- Splitting and joining string literals is supported. Pressing “Enter” in a literal turns it into two literals, and the “Join lines” action joins it back together.
- Live templates
- Finally, live templates are supported. At this time SourceKit-LSP still provides similar completion items, but they will be filtered in one of the next updates.
Swift Support Improvements#
- Documentation comments
///documentation comments are better supported now.- Copyright plugin support
- The Swift language is now supporting Copyright headers with the JetBrains plugin.
- Swift syntax
- The new
module::selectorsyntax of Swift 6.3 is now supported. - Noctule’s Swift parser was updated with test coverage and fixes to support all available, implemented Swift Evolution proposals.
- Error recovery
- Better parser error recovery improves editing, formatting and highlighting of incomplete or erroneous files.