Skip to content

feat: plugin settings SDK#1266

Merged
steveevansdev merged 3 commits into
floatpane:masterfrom
andrinoff:feat/plugin-settings
May 11, 2026
Merged

feat: plugin settings SDK#1266
steveevansdev merged 3 commits into
floatpane:masterfrom
andrinoff:feat/plugin-settings

Conversation

@andrinoff
Copy link
Copy Markdown
Member

What?

Adds user-configurable plugin settings. Plugins declare typed options via a new matcha.settings(spec) Lua API supporting boolean, number, and string types with defaults, labels, and descriptions. The call returns a read-only proxy table whose fields reflect live values, so hook callbacks read current settings through closure capture. A second helper matcha.get_setting(key [, plugin]) provides explicit lookup. The plugin Manager tracks the loading plugin so schemas attribute correctly, and gains methods for reading, writing, loading, and exporting setting values with type coercion. Values persist in config.json under a new plugin_settings field (both regular and secure-mode disk formats).

Why?

Plugins shipped hardcoded constants (keyword lists, thresholds, toggles). Users had to edit Lua source to tweak them — fragile and lost on plugin reinstall. Plugins now declare schemas; users edit values in TUI; values persist across upgrades. Bool toggle avoids parser errors from typing true/false/1/0 inconsistently.

Co-authored-by: Lea <lea@floatpane.com>
Co-authored-by: Steve Evans <steve@floatpane.com>
Signed-off-by: drew <me@andrinoff.com>
@andrinoff andrinoff requested a review from a team as a code owner May 9, 2026 12:01
@floatpanebot floatpanebot added area/tui Terminal UI / view layer area/plugin Plugin system area/i18n Localization / translations area/config Configuration / settings area/docs Docs site / README enhancement New feature or request labels May 9, 2026
Signed-off-by: drew <me@andrinoff.com>
Comment thread tui/settings_plugins.go Outdated
Comment thread plugin/settings.go
Signed-off-by: drew <me@andrinoff.com>
Copy link
Copy Markdown
Member

@steveevansdev steveevansdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@steveevansdev steveevansdev merged commit a9fc2f0 into floatpane:master May 11, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/config Configuration / settings area/docs Docs site / README area/i18n Localization / translations area/plugin Plugin system area/tui Terminal UI / view layer enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants