macOS Compatibility

Nextpad++ for Mac is a Universal Binary with native slices for both architectures. No Rosetta translation is needed on Apple Silicon.

RequirementDetails
Operating SystemmacOS 11 (Big Sur) or later
Apple SiliconNative arm64 — M1, M2, M3, M4, M5 at full speed
IntelNative x86_64 — all Intel Macs supported by macOS 11+
Disk Space~12 MB download, ~50 MB installed
RAM4 GB minimum, 8 GB recommended
DisplayRetina / HiDPI supported natively via Core Text + Core Graphics
Code SigningApple Developer ID signed + Apple notarized (Gatekeeper accepted)

Plugin Development Guide

Nextpad++ for Mac loads plugins as native .dylib dynamic libraries from ~/.notepad++/plugins/PluginName/PluginName.dylib. The plugin API mirrors the Windows interface, adapted for macOS conventions.

Required Exports

Every plugin must export these 5 functions with C linkage and NPP_EXPORT visibility:

extern "C" NPP_EXPORT void        setInfo(NppData nppData);
extern "C" NPP_EXPORT const char*  getName(void);
extern "C" NPP_EXPORT FuncItem*    getFuncsArray(int *nbF);
extern "C" NPP_EXPORT void        beNotified(SCNotification *notifyCode);
extern "C" NPP_EXPORT intptr_t    messageProc(uint32_t msg, uintptr_t wParam, intptr_t lParam);

Core Data Structures

NppData — passed to setInfo():

struct NppData {
    NppHandle _nppHandle;              // routes NPPM_* messages
    NppHandle _scintillaMainHandle;    // primary editor (SCI_* messages)
    NppHandle _scintillaSecondHandle;  // secondary editor
    NppSendMessageFunc _sendMessage;   // function pointer (replaces Win32 SendMessage)
};

FuncItem — menu command descriptor:

struct FuncItem {
    char _itemName[64];        // UTF-8 menu text (NPP_MENU_ITEM_SIZE)
    PFUNCPLUGINCMD _pFunc;     // command callback (nullptr = separator)
    int _cmdID;                // host-assigned command ID
    bool _init2Check;          // initial checkmark state
    ShortcutKey *_pShKey;      // optional keyboard shortcut
};

ShortcutKey — includes macOS _isCmd modifier:

struct ShortcutKey {
    bool _isCtrl;   // Control key
    bool _isAlt;    // Option key
    bool _isShift;  // Shift key
    bool _isCmd;    // Command key (macOS-specific)
    UCHAR _key;     // virtual key code
};

Key Differences from Windows

WindowsmacOS
.dll (PE binary).dylib (Mach-O binary)
__declspec(dllexport)NPP_EXPORT (__attribute__((visibility("default"))))
wchar_t* (UTF-16)char* (UTF-8)
::SendMessage(hwnd, msg, w, l)nppData._sendMessage(handle, msg, w, l)
HWNDuintptr_t (opaque, typedef NppHandle)
Win32 dialogs (.rc)Native AppKit (NSAlert, NSPanel)
INI files (GetPrivateProfileString)JSON files (NSJSONSerialization)
isUnicode() export requiredNot needed (all strings are UTF-8)
ShortcutKey has 4 fieldsShortcutKey has 5 fields (_isCmd added)

Implemented NPPM Messages

Over 30 NPPM messages are handled by the macOS host:

MessagePurpose
NPPM_GETCURRENTSCINTILLAGet active editor handle (0=main, 1=secondary)
NPPM_GETCURRENTLANGTYPEGet canonical LangType integer for current buffer
NPPM_GETLANGUAGENAMEGet display name for a LangType integer
NPPM_GETFULLCURRENTPATHGet full file path of active buffer
NPPM_GETFILENAMEGet file name only
NPPM_GETEXTPARTGet file extension only
NPPM_GETCURRENTDIRECTORYGet directory of active file
NPPM_GETFULLPATHFROMBUFFERIDGet path from a buffer ID
NPPM_DOOPENOpen a file by path
NPPM_SAVECURRENTFILESave the active buffer
NPPM_SETMENUITEMCHECKSet/clear checkmark on a plugin menu item
NPPM_GETPLUGINSCONFIGDIRGet plugins/Config/ directory path
NPPM_GETPLUGINHOMEPATHGet plugins/ directory path
NPPM_ALLOCATECMDIDAllocate a block of command IDs
NPPM_ALLOCATEMARKERAllocate a marker ID
NPPM_ALLOCATEINDICATORAllocate an indicator ID
NPPM_MENUCOMMANDExecute a host menu command by ID
NPPM_MSGTOPLUGINSend a message to another plugin
NPPM_ISDARKMODEENABLEDCheck if the host is in dark mode
NPPM_SETPLUGINSUBSCRIPTIONSOpt out of SCN_UPDATEUI/SCN_PAINTED (macOS-specific)

The full list of defines is in NppPluginInterfaceMac.h on GitHub.

Notifications Emitted by the Host

NotificationWhen
NPPN_READYHost finished initializing, plugins loaded
NPPN_SHUTDOWNHost is about to exit
NPPN_BEFORESHUTDOWNHost is starting shutdown sequence
NPPN_TBMODIFICATIONToolbar is ready for plugin icons
NPPN_BUFFERACTIVATEDA different tab was selected
NPPN_FILESAVEDA file was saved
NPPN_LANGCHANGEDBuffer language changed

Scintilla notifications forwarded: SCN_MODIFIED, SCN_CHARADDED, SCN_UPDATEUI, SCN_PAINTED, SCN_AUTOCSELECTION, SCN_AUTOCCANCELLED.

Building a Plugin

Minimal CMakeLists.txt:

cmake_minimum_required(VERSION 3.20)
project(MyPlugin LANGUAGES CXX OBJCXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_OBJCXX_STANDARD 17)
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
set(CMAKE_OSX_DEPLOYMENT_TARGET "11.0")
set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64")

set(NPP_MACOS_DIR "/path/to/notepad-plus-plus-macos")
set(SCINTILLA_INCLUDE "/path/to/scintilla/include")

add_library(MyPlugin SHARED src/MyPlugin.mm)
target_include_directories(MyPlugin PRIVATE
    ${NPP_MACOS_DIR}/src ${SCINTILLA_INCLUDE})
target_link_libraries(MyPlugin PRIVATE "-framework Cocoa")
set_target_properties(MyPlugin PROPERTIES PREFIX "" SUFFIX ".dylib")

Build:

mkdir build && cd build && cmake .. && make -j$(sysctl -n hw.ncpu)

Install: copy MyPlugin.dylib to ~/.notepad++/plugins/MyPlugin/ and restart Notepad++.

Submitting to the Plugin Registry

  1. Create a GitHub repo, create a Release with a ZIP containing PluginName/PluginName.dylib
  2. Compute SHA256: shasum -a 256 PluginName.zip
  3. Add an entry to nppPluginList/pl.macos-arm64.json
  4. Open a pull request — once merged, the plugin appears in Plugin Admin automatically

Configuration & Data Directory

All configuration lives under ~/.notepad++/. To back up or migrate your setup, copy the entire directory.

~/.notepad++/ +-- config.xml # Main app preferences +-- session.xml # Open tabs / session state +-- shortcuts.xml # Custom keyboard shortcuts +-- contextMenu.xml # Right-click context menu +-- tabContextMenu.xml # Tab bar context menu +-- stylers.xml # Active theme overrides +-- langs.xml # Language configuration +-- macros.plist # Saved macros +-- plugins/ # Installed plugin dylibs | +-- ComparePlus/ | | +-- ComparePlus.dylib | +-- nppAutoDetectIndent/ | | +-- nppAutoDetectIndent.dylib | +-- Config/ # Per-plugin config files | +-- NppFavorites.json | +-- SelectToClipboard.json | +-- nppAutoDetectIndent.json | +-- DoxyIt.json | +-- QuickText.ini +-- themes/ # Color scheme theme XMLs +-- userDefineLangs/ # User Defined Language XMLs +-- functionList/ # Function list parser XMLs +-- localization/ # UI language XMLs (137 languages) +-- backup/ # Auto-backup files

Plugins should store config in plugins/Config/ by calling NPPM_GETPLUGINSCONFIGDIR in setInfo(). Do not hardcode ~/.notepad++/ directly.

Contribute

Nextpad++ for Mac is open source under GPL v3. Contributions are welcome:

  • Port a plugin — adapt to NppPluginInterfaceMac.h, build as universal dylib, submit to the plugin registry
  • Report a bugopen an issue on GitHub
  • Fix a bug or add a feature — fork the main repo, open a pull request
  • Improve docs — PRs welcome on the website repo

Read more on the About page or meet the authors.