Skip to content

Plugin Introduction

Federico Conticello edited this page Mar 24, 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

Security Model

Plugins run inside a sandbox:

  • Filesystem access is restricted to the project root directory
  • Commands require explicit user approval before a plugin can run them
  • No access to os, io, debug, require, or other dangerous Lua globals
  • Resource limits: 1M instructions per hook call, 16 MB memory per plugin
  • Three trust tiers: Official (cryptographically signed), Community (SHA-256 checksums), Manual (unverified)

Installing Plugins

From the Plugin Manager

  1. Open Plugins > Plugin Manager
  2. Browse the Official or Community tab
  3. Click Install on the plugin you want
  4. Official plugins are verified with ed25519 signatures; community plugins are verified with SHA-256 checksums

Manual Installation

  1. Download or clone the plugin into ~/.config/ferrispad/plugins/{plugin-name}/
  2. The plugin must contain at least init.lua and plugin.toml
  3. Restart FerrisPad or reload plugins via 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