Skip to content

feat: support inline plugin merging by name - #617

Merged
nklmilojevic merged 1 commit into
mainfrom
feat/plugin-name-merge
Sep 16, 2026
Merged

nklmilojevic merged 1 commit into
mainfrom
feat/plugin-name-merge

Conversation

@nklmilojevic

Copy link
Copy Markdown
Owner

Shared inline plugins in conf.d/ currently replace the complete inherited plugin list. Add per-file plugins_merge = "name" so shared and personal plugins can coexist. Replacement remains the default for existing configurations.

In name mode, later entries replace complete definitions with the same name and keep their position. New names are appended. plugins_remove removes inherited inline entries before that file adds entries. Both controls apply only to their own file. Package and bundled-plugin loading stays unchanged.

Includes TOML/YAML configuration tests, a keyboard-driven :reload test, and configuration documentation.

Validation: just check, Markdown formatting, and git diff --check passed.

Agreed discussion: #603 (comment)

Closes #616

Shared plugin files previously replaced the complete inherited inline plugin list. Add per-file name merging and removal controls while keeping replacement as the default for existing configurations.

Closes #616
@greptile-apps

greptile-apps Bot commented Sep 16, 2026

Copy link
Copy Markdown

Greptile Summary

This PR adds opt-in, per-file merging and removal of inline plugins while preserving whole-list replacement as the default.

  • Introduces plugins_merge = "name" with case-sensitive, stable-position replacement semantics.
  • Adds plugins_remove processing before each file's plugin entries are applied.
  • Applies the controls consistently across base, drop-in, cluster, context, and reload paths.
  • Adds TOML/YAML configuration coverage, a palette-driven reload test, and user documentation.

Confidence Score: 5/5

The PR appears safe to merge; the implementation matches the documented per-file semantics and no actionable defects were identified.

Plugin controls are validated and applied once per source file, merge ordering remains base-to-drop-in-to-cluster-to-context, and package and bundled-plugin loading remains downstream and unchanged.

Important Files Changed
Filename Overview
src/config.rs Implements one-shot per-file plugin merge/removal controls in the configuration resolution pipeline and adds focused unit coverage.
src/app/tests.rs Verifies that palette-triggered reloads apply name merging, removal, and default replacement live.
docs/configuration.md Documents control scope, ordering, duplicate-name behavior, replacement defaults, and interaction with package and bundled plugins.
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Base configuration] --> B[Apply base plugin controls]
  B --> C[conf.d files in filename order]
  C --> D[Apply each file's removals]
  D --> E{plugins_merge}
  E -->|replace, default| F[Replace inherited plugin array]
  E -->|name| G[Replace matching names in place<br/>append new names]
  F --> H[Cluster override]
  G --> H
  H --> I[Context override]
  I --> J[Deserialize resolved Config]
  J --> K[Load package plugins]
  K --> L[Add non-conflicting bundled plugins]
Loading

Reviews (1): Last reviewed commit: "feat: support inline plugin merging by n..." | Re-trigger Greptile

@nklmilojevic
nklmilojevic merged commit 65cac68 into main Sep 16, 2026
4 checks passed
@nklmilojevic
nklmilojevic deleted the feat/plugin-name-merge branch September 16, 2026 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: support explicit inline plugin merging by name

1 participant