Novaโ„ข

Extensions


Readme

Icarus provides first-class language support for Swift, C, C++, and Objective-C.

If you are Swift or C-family language developer, Icarus can provide you with first-class support for building client- and server-side applications and frameworks.

โœจ Fun fact: This extension's debugging support was built entirely using Nova and Icarus. "Look ma, no Xcode!"

Features

Icarus adds:

  • ๐Ÿ–๏ธ Syntax highlighting, symbolication, and code folding using Tree-sitter grammars
  • ๐Ÿงช Language intelligence, completions, issues, and more via SourceKit-LSP
  • ๐Ÿ› Debugging via LLDB

Intelligence is provided using SourceKit-LSP from the Swift open-source project. This language server provides support for Swift natively and uses clangd behind the scenes for C-family languages.

Debugging is supported using LLDB.framework, distributed with Apple's Xcode tools and the Swift compiler toolchain.

Requirements

Syntax highlighting, symbolication, and code folding for all supported languages are included out of the box.

For language intelligence, completions, and debugging, a Swift toolchain is required (even if you are just working with C-family languages, as the toolchain provides support for everything).

  • If you already have Apple's Xcode app in your /Applications folder, there should be nothing else you'll need to do.
  • Otherwise, the easiest way to get started is to download Apple's Xcode command-line tools using xcode-select --install.
  • Alternatively, you can install a development version of the Swift toolchain and select it for use in the extension preferences.

C / C++ and Compile Commands

Projects utilizing the C or C++ languages may need to provide a compile_commands.json file in the project root for some language features to work. This file can be generated by most common build systems, including CMake. For more information, check out the Clang documentation.

Building, Running, and Debugging Your Project

To build and run your project, you will want to create a Task in Nova's tasks interface. Follow these steps for a quick way to get up and running:

  1. Open your project settings by clicking your project name in the toolbar.
  2. Next to "Tasks" in the settings list, click the plus button and choose LLDB Debug to add a new debugging task.
    • Name your task something descriptive if you'd like, such as the name of your built target, its configuration, etc.
  3. Click the disclosure triangle beside your task to expand out the Pipeline options
  4. In the "Build" section, add one or more custom script steps to tell Nova how to interface with your build system.
  5. In the main options for the task, set the Executable to the built path of your target.

For the Build pipeline step(s), it should just be a matter of adding the appropriate shell commands to a Build pipeline step to invoke and compile your target or product in the same way you'd build in a terminal.


Changelog

Version 1.0.2

  • Fixed an issue with C++ namespace highlight queries which could cause all C++ to fail to work properly.

Version 1.0.1

  • Fixed an issue with the file permissions of the debug adapter executable, which prevented it from being launched after the extension was installed.

Version 1.0

  • Initial release

License

MIT License

Copyright (c) 2023 Panic Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.