Skip to content

Conversation

@Wouter01
Copy link
Member

@Wouter01Wouter01 commented May 23, 2023

Description

This PR adds a base API for integrating extensions with CodeEdit. It offers the following:

  • API to create a running extension
  • API to create settings
  • API to create sidebars
  • some other APIs that aren't working yet
  • testing for LSP integration
  • limited docC docs

It also adds Swiftlint to this package.

See CodeEditApp/CodeEdit#1274 for CodeEditKit integration in CodeEdit

Note that the extension system is a WIP and is by no means done yet. Therefore, no docs will be added until the API gets stable.

Also note that a lot of these features aren't polished yet, but that isn't the goal of this PR. Instead, the goal is to have a base API and implementation that can be improved upon in the future.

Example API:

@mainfinalclassSidebarExtensionExample:CodeEditExtension{vardescription:String=""varentitlements:[Entitlement]=[]}extensionSidebarExtensionExample:SettingsExtension{varsettings:someView{Toggle("Toggle 1", isOn:.constant(true))Toggle("Toggle 2", isOn:.constant(false))}}extensionSidebarExtensionExample:SidebarExtension{varsidebars:someSidebar{Inspector(id:"umbrellaInspector"){Form{Text("Hello, world!")Button("Print"){NSLog("Print")}Button("Warning"){Logger(subsystem:"DummyExt", category:"").warning("Warning")}Button("Info"){Logger(subsystem:"DummyExt", category:"").info("Info")}Button("Fault"){Logger(subsystem:"DummyExt", category:"").fault("Fault")}}.formStyle(.grouped)}.help("Umbrella Inspector").icon("umbrella")Navigator(id:"carrotNavigator"){Form{Text("Hello, world!")}.formStyle(.grouped)}.help("Carrot Navigator").icon("carrot")}}

Related Issues

Checklist

  • I read and understood the contributing guide as well as the code of conduct
  • The issues this PR addresses are related to each other
  • My changes generate no new warnings
  • My code builds and runs on my machine
  • My changes are all related to the related issue above
  • I documented my code

- Added extension Navigators to CodeEdit Window
Signed-off-by: Wouter01 <[email protected]>
Signed-off-by: Wouter01 <[email protected]>
- Added default body implementation - Added ObservableObject requirement - Moved from @main struct to @main final class Signed-off-by: Wouter01 <[email protected]>
Signed-off-by: Wouter01 <[email protected]>
Signed-off-by: Wouter01 <[email protected]>
Signed-off-by: Wouter01 <[email protected]>
Signed-off-by: Wouter01 <[email protected]>
Signed-off-by: Wouter01 <[email protected]>
Signed-off-by: Wouter01 <[email protected]>
Signed-off-by: Wouter01 <[email protected]>
Signed-off-by: Wouter01 <[email protected]>
Signed-off-by: Wouter01 <[email protected]>
@Wouter01Wouter01 mentioned this pull request May 23, 2023
6 tasks
@Wouter01Wouter01 marked this pull request as ready for review May 23, 2023 13:12
@Wouter01Wouter01 self-assigned this May 23, 2023
@Wouter01Wouter01 added documentation Improvements or additions to documentation enhancement New feature or request labels May 23, 2023
@austincondiffaustincondiff merged commit 96baa07 into mainMay 29, 2023
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentationenhancementNew feature or request

Projects

Status: 👀 In Review

Development

Successfully merging this pull request may close these issues.

3 participants

@Wouter01@austincondiff