Nef-plugin - 🔌 an Xcode extension to use nef features easily

Overview

nef: an Xcode plugin

nef Swift UI Swift 5.3 Xcode 11+ macOS 10.15+

 

This project provides an extension for Xcode to integrate some nef features directly in the IDE. Using the core of nef, you can export snippets from your code selection directly in Xcode.

Features

💡 Exports a code selection to image or clipboard.

💡 Generates Markdown files from Xcode Playground.

💡 Builds a Playground Book with external dependencies defined in a Swift Package.

 

💻 Installation

➊ Latest binary in Releases section (preferred)

➋ Using Mac App Store

To complete the installation, you should enable nef extension from System Preferences > Extensions > Xcode Source Editor

 

✍️ Usage

You can find the nef plugin options in Xcode > Editor

Editor > nef

🔧 Preferences

You can customize the output image using the preferences action Editor > nef > Preferences

nef: preferences Xcode extension

🌁 Export code selection to image or clipboard

You can export your current code selection into a snippet, you only need to select the action Editor > nef > Code selection...

Output

nef: action for exporting code selection to image file nef: action for exporting code selection to clipboard

📃 Generates markdown file from Playground

Xcode Playgrounds let you write comments in markdown format using the symbols:

  1. //: for single line comments.
  2. /*: */ for multiline comments.

Markup for playgrounds includes page level formatting for headings and other elements, formatting spans of characters, showing inline images, and several other features. You can read more in the Markup Formatting Reference.

You can create a markdown file from playground page with the nef action Editor > nef > Export Playground page to markdown

📲 Create a Playground Book from your Swift package

You can create a Playground compatible with you iPad from a Swift package. You only need to open the swift package in Xcode, and select the action Editor > nef > Playground Book from Swift Package

It will ask you where to save the Playground Book, and it will start to build it.

nef: action for making a Playground Book

This feature needs to use Swift Package Manager tool. Consequently, it will need to disable the sandbox thus it is not allowed in the App Store; but if you want to enjoy this feature, you only need to install the .dmg you'll find in the releases section.

 

🔨 Xcode navigation keyboard shortcuts

To make you a more productive developer, you can associate a keyboard shortcut to each nef action. Open the shortcuts menu in Xcode > Preferences... > Key Bindings and set your command.

nef: set keyboard shortcut

⚖️ License

Copyright (C) 2019-2021 The nef Authors

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Comments
  • M1 Xcode 13

    M1 Xcode 13

    Looks like the app doesn't work on M1 Device , I can not see the option in the menu however I could see that before , I am not sure its related to M1 or not but in my old Mac every things were ok and I used migration but I checked the app and it's still just for Intel , this can be for Xcode 13 or M1 can you please check it ?

    opened by SaeedRahmatolahi 5
  • Carbon image into the pasteboard

    Carbon image into the pasteboard

    The aim of this PR is to provide an option to create a carbon image from a code snippet and copy it into the pasteboard, so it can be pasted anywhere by the user.

    When the snippet has been created and copied, the user will see a local notification with a "Save to disk" action that will save it to the directory if the user presses it.

    opened by jdev7 4
  • Refactor logic using FP

    Refactor logic using FP

    This PR complete the refactor about business logic for nef plugin using FP. This refactor split views, routes, nef (logic) and external services (notifications, clipboard...)

    • AppDelegate: entry point to transform Scheme URL into SourceEditorModel command
    • App: It routes the command from nef extension to associate controller. An abstract representation of Window.
    • Controllers: carbon, notification, markdown, playground-book logic.
    opened by miguelangel-dev 0
  • SourceEditorModels module

    SourceEditorModels module

    This PR extracts common Commands model from nef-plugin and nef, in a new module called SourceEditorModels - reducing the duplicity of the code.

    It keeps sync both modules (plugin and related app), and remove any string check. Also, it removes these declarations from Info.plist, making the commands typed.

    See the entry-class SourceEditorExtension for more information.

    opened by miguelangel-dev 0
  • Upgrade nef library - to use the new nef modularization

    Upgrade nef library - to use the new nef modularization

    Description

    This PR is followed by the nef modularization - where we have created new functional APIs to use CarbonIO JekyIO MarkdownIO

    It could help to see a practical case of use nef library

    APIs

    You can find the whole APIs description in the next file

    Screenshots

    nef 2019-11-13 19 02 21 nef 2019-11-13 19 11 11

    Y la invocación quedaría de la siguiente manera: nef 2019-11-13 19 10 33

    opened by miguelangel-dev 0
  • Pick output folder

    Pick output folder

    Description

    After Apple review, we need to let the user select the output folder. Currently, we are using the pre-set download location to ~/Downloads and Apple said the Downloads for should only be used files downloaded from the Internet.

    • Launch to the user a dialogue to let to set up the output folder.
    • Get the output and persist, and use the bookmarks entitlement to remember the user’s chosen location.
    • Add in preferences view a new row to let the user change the last output choice.

    Screenshot 2019-10-14 at 15 54 14

    opened by miguelangel-dev 0
  • Improvements in the process for generating snippets

    Improvements in the process for generating snippets

    Description

    We have added extra information in the Xcode and show output folder for improving the user experience with the Xcode extension.

    • Added extra information: internet connection and generate process.
    • Check if the user has an internet connection before starting to generate process.
    • Added link to App Store in README
    opened by miguelangel-dev 0
  • nef about - app

    nef about - app

    Description

    We want to use the power of nef in Xcode - in last PR we create the plugin for Xcode where user can export the selected code using nef (and Carbon integration). In the next one we completed the second option, the Carbon preferences for customization how the selected code will be exported.

    In this PR, we will provide the About page where the user will see how to install the plugin.

    How did it implement?

    About option has been done using SwiftUI

    Screenshots

    Captura de pantalla 2019-08-05 a las 16 37 05

    Plugin for testing

    You need to have installed Xcode 11 + Catalina

    nef.zip

    opened by miguelangel-dev 0
  • nef preferences - app

    nef preferences - app

    Description

    We want to use the power of nef in Xcode - in last PR we create the plugin for Xcode where user can export the selected code using nef (and Carbon integration). In this PR we have completed the second option, the Carbon preferences for customization how the selected code will be exported.

    How did it implement?

    Preferences option has been done using SwiftUI and following an MVVM architecture using the new Combine framework (updated to beta 5)

    View PreferencesView - is the main view (notify/binding state from PreferencesVM) CheckOptionView - to create checks options ColorOptionView - to create color picker PickerOptionView - to create picker options CarbonViewer - is the bridge to CarbonWebView (AppKit) to show Carbon snippet

    ViewModel PreferencesViewModel - updates/notifications from model, it has a reference to model PreferencesModel

    Model PreferencesModel - is the app state (preferences configuration) PreferencesDataSource - is our DS; it will use PreferencesModel to persist/recover the app's state

    Screenshots

    nef-preferences

    Plugin for testing

    You need to have installed Xcode 11 + Catalina

    nef.zip

    opened by miguelangel-dev 0
  • added nef dependency + create carbon plugin

    added nef dependency + create carbon plugin

    Description

    We want to use the power of nef in Xcode - so we will work in an Xcode Extension. In this PR we have created the structure for plugin and added the carbon action using the new nef modularization (completed in https://github.com/bow-swift/nef/pull/80)

    Logic tree

    • nef is the macOS app. It will let us to setup nef
    • nef-plugin Xcode Extension
    • Swift Package Dependencies - nef api

    Captura de pantalla 2019-07-09 a las 16 08 21

    How did it implement?

    • It is using the new Swift Package Manager to resolve nef dependencies.
    • UI will be done using SwiftUI
    • The macOS app can be initiated using scheme url types - it is necessary to launch export carbon snippet action with the code selection.

    Captura de pantalla 2019-07-09 a las 16 41 36

    opened by miguelangel-dev 0
Releases(3.1.0)
Owner
Bow
Functional Programming in Swift
Bow
XTextHandler - Xcode Source Editor Extension Tools (Xcode 8 Plugins)

Download Let's Swift! xTextHandler has been rewritten in Swift. The Objective-C version can be found in: https://github.com/cyanzhong/xTextHandler-obj

Ying Zhong (Inactive) 1.5k Sep 7, 2022
Xcode plugin to let you jump to GitHub History, Blame, PRs, Issues, Notifications of any GitHub repo with one shortcut.

Reveal-In-GitHub Xcode plugin to let you jump to GitHub History, Blame, PRs, Issues, Notifications of current repo in one second. My company work on G

lzwjava 257 May 17, 2022
Plugin for Xcode to integrate the Reveal App to your project automatic.

Reveal-Plugin-for-Xcode Plugin for Xcode to integrate the Reveal App to your project automatic(Without any modifications to your project). Please note

Eric 229 Jun 29, 2022
Xcode plugin which help you write code faster.

MLAutoReplace Xcode plugin, Re-Intent, make you write code more quickly. Use a portion code of VVDocumenter-Xcode. ##Overview You can use shortcut key

molon 233 Sep 9, 2022
CleanClosureXcode - An Xcode Source Editor extension to clean the closure syntax.

Clean Closure - Xcode Source Editor Extension Clean Closure is a simple Xcode Source Editor Extension for Xcode 8. It parses each line of a file to si

Patrick Balestra 188 Jun 18, 2022
SwiftInitializerGenerator - Xcode Source Code Extension to Generate Swift Initializers

Swift Initializer Generator This Xcode Source Code Extension will generate a Swift initializer based on the lines you've selected. Handy if you made a

Bouke Haarsma 718 Aug 21, 2022
XcodeEquatableGenerator - Xcode 8 Source Code Extension will generate conformance to Swift Equatable protocol based on type and fields selection.

Depricated! There is not need for it at the moment as Swift compiler can do that for us ?? Swift Equatable Generator Xcode 8 Source Code Extension wil

null 191 Dec 10, 2022
Import - Xcode extension for adding imports from anywhere in the code ☝️

Import ☝️ Xcode extension for adding imports from anywhere in the code. Now available on App Store Why? Because sometimes you are on 300th line of cod

Marko Hlebar 839 Nov 10, 2022
Mark - Xcode extension for generating MARK comments.

Mark Xcode extension for automatic generation of MARK comments. Why? If you would like to organize your code with MARK comments, this will save you so

Velislava Yanchina 160 Dec 17, 2022
XShared - Xcode extension that allows you copying the code with special formatting quotes for social (Slack, Telegram)

This extension is for those who like to show code to the public ?? Xcode extension which allows you copying the code with special formatting quotes fo

Nikita Ermolenko 75 Jun 18, 2022
Xgist - Xcode extension to send code to GitHub's Gist

Xgist Xgist is a Xcode extension to send code to GitHub's Gist. The extension will send your code selection to Gist and automatically copy the Gist UR

Fernando Bunn 76 Jul 2, 2022
DocumenterXcode - Attempt to give a new life for VVDocumenter-Xcode as source editor extension.

DocumenterXcode Xcode source editor extension which helps you write documentation comment easier, for both Objective-C and Swift. This project is an a

Serhii Londar 34 Dec 17, 2022
Comment-Spell-Checker - Xcode extension for spell checking and auto-correcting code comments.

Comment Spell Checker An Xcode Source Editor extension that runs spell check and auto correct on your code comments. Features Supports mutliple commen

Velislava Yanchina 157 Aug 28, 2022
Multiliner - An Xcode source extension to expand lengthy lines

Multiliner An Xcode source extension to expand lengthy lines. Super lightweight, 1 file. It expands long lines. That's it! Works with: Initializers Fu

Andrew Zheng 629 Jan 4, 2023
Snowonder - 🔮 Magical import declarations formatter for Xcode

Snowonder is Xcode Extension that adds some convenient formatting operations for Import Declarations. This extension is created with latest stable Swi

Alexey Karetski 104 Jan 4, 2023
XVim2 - Vim key-bindings for Xcode 9

XVim2 XVim2 is a Vim plugin for Xcode intending to offer a compelling Vim experience without the need to give up any Xcode features. Xcode 9 or above,

null 2.3k Jan 1, 2023
nef💊a toolset to ease the creation of documentation in the form of Xcode Playgrounds

nef, short for Nefertiti, mother of Ankhesenamun, is a toolset to ease the creation of documentation in the form of Xcode Playgrounds. It provides com

Bow 257 Dec 6, 2022
Xcode-streamdeck-plugin - A Stream Deck plugin for Xcode

Stream Deck Xcode Plugin This repository contains a Stream Deck plugin to add so

Daniel Kennett 77 Dec 27, 2022
LinkedLog is a Xcode plugin that includes a Xcode PCH header file template that adds the macros `LLog` and `LLogF` and parses their output to link from the console to the corresponding file and line.

LinkedLog Xcode Plugin LinkedLog is a Xcode plugin that includes a Xcode PCH file template that adds the macros LLog and LLogF. The LLog macro will wo

Julian F. Weinert 22 Nov 14, 2022
Xcode plugin that brings ⇧⌘T from AppCode over to Xcode

Aviator An Xcode Plugin that brings ⇧⌘T over to Xcode This minimal plugin allows you to use the key combo ⇧⌘T to toggle between source and test files.

Mark Sands 29 Aug 18, 2018