Skip to content

Plugin Introduction

fedro86 edited this page Oct 20, 2026 · 3 revisions

Plugin System

FerrisPad has a built-in plugin system powered by Lua 5.4, statically linked into the editor — no external runtime needed.

What Plugins Can Do

  • React to editor events (file open, save, close, text changes, theme toggle)
  • Run external commands (linters, formatters, build tools)
  • Read and write files within the project directory
  • Display results in tree views, split panels, or an embedded terminal
  • Add custom menu items with keyboard shortcuts
  • Show diagnostics (errors, warnings) with line annotations
  • Access git status and compute diffs

Official vs Community vs Manual Plugins

Official plugins are developed and maintained by the FerrisPad team. They follow the Philosophy to the letter — 0% CPU idle, purely event-driven, no background processes. They are cryptographically signed with ed25519 and verified on install.

Community plugins are developed by anyone. We're all adults in the room — community authors are free to build plugins that don't fully comply with the Philosophy. However, every community plugin goes through a mandatory security review before being listed in the registry. This is non-negotiable. Community plugins are verified with SHA-256 checksums and undergo static source analysis to detect suspicious patterns (dynamic code execution, FFI access, global table manipulation). If a community plugin is found to represent a security threat to FerrisPad or its users, it is removed from the registry. Removed plugins can still be installed manually via their GitHub URL.

Manual plugins are not listed in any registry. You can install them directly from the Plugin Manager by pasting a GitHub repository URL — FerrisPad downloads and installs the plugin automatically. You can also copy files manually into ~/.config/ferrispad/plugins/. No checksum or signature verification is performed — you take full responsibility.

All three categories run inside the same sandbox with the same security restrictions (filesystem, commands, resource limits).

For detailed documentation on each plugin and the full plugin list, see the ferrispad-plugins wiki.

Security Model

Plugins run inside a sandbox:

  • Filesystem access is restricted to the project root directory; plugins cannot create or write files outside it
  • Commands require explicit user approval before a plugin can run them, and an approved command cannot be turned into a different one through its arguments or working directory
  • Isolation: each plugin runs in its own Lua environment, so one plugin cannot read another plugin's globals or change the string, table and math libraries other plugins use
  • No access to os, io, debug, require, or other dangerous Lua globals
  • Resource limits: 1M Lua instructions per hook call, a 16 MB Lua memory budget, and a 30-second time limit per hook, so a stuck plugin cannot freeze the editor
  • Static source analysis on install — an advisory scan that warns about risky patterns (dynamic code execution, FFI, debug library access, global table manipulation); the sandbox above is what enforces safety

Installing Plugins

From the Plugin Manager

  1. Open Plugins > Plugin Manager
  2. Browse the Official or Community tab and click Install
  3. Or paste a GitHub repository URL in the install field to install any plugin directly

Official plugins are verified with ed25519 signatures. Community plugins are verified with SHA-256 checksums. URL-installed plugins undergo static source analysis but have no registry verification.

Manual File Copy

You can also copy plugin files directly into ~/.config/ferrispad/plugins/{plugin-name}/. The plugin must contain at least init.lua and plugin.toml. Restart FerrisPad or go to Plugins > Reload All.

Enabling and Disabling

  • Toggle plugins on/off via Plugins > {Plugin Name} in the menu
  • Disabled plugins are not loaded and consume zero resources
  • Plugin state persists across sessions

Plugin Configuration

Many plugins have configurable settings:

  1. Go to Plugins > {Plugin Name} > Settings
  2. Adjust parameters (each plugin defines its own settings)
  3. Settings are stored in FerrisPad's settings file and persist across sessions

For Plugin Developers

See the ferrispad-plugins wiki for the full API reference, hook documentation, and development guide.

Clone this wiki locally