-
Notifications
You must be signed in to change notification settings - Fork 317
Add guidance for plugins vs config options in emitters #8982
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Added a new section in the emitters-basics documentation explaining when to use plugins versus configuration options. This includes: - Clear definitions of plugins (composable visitor sets for specific scenarios) - When to use config options (independent toggleable features) - Best practices for avoiding unnecessary configuration - Practical examples to help emitter authors make the right choice Co-authored-by: JoshLove-msft <[email protected]>
| - The feature has trade-offs that different users might evaluate differently | ||
| - Backward compatibility requires making a change opt-in | ||
|
|
||
| For example, if you're adding support for generating additional utility functions, consider whether this should be: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot this is not a good example and we don't even provide guidance on which route to take. We should remove this section.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the example section in 32c6293.
| **Best practice:** Whenever possible, enable features by default without requiring configuration. Only add configuration when: | ||
|
|
||
| - Different users have genuinely different needs or preferences | ||
| - The feature has trade-offs that different users might evaluate differently |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot This is kind of meaningless
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the vague "trade-offs" line in 7da3f14.
As requested in PR feedback, removed the example section (lines 159-163) that didn't provide clear guidance on which route to take. Co-authored-by: JoshLove-msft <[email protected]>
Removed the unclear "trade-offs" line from best practices as it didn't provide actionable guidance. Co-authored-by: JoshLove-msft <[email protected]>
✅ Completed: Add guidance for plugins vs config options in emitters
Summary
Added a new "Plugins vs. config options" section to the emitters-basics documentation (placed after "Emitter options vs. decorators" section). The guidance includes:
Plugins
Composable sets of visitors/components for specific scenarios:
Config Options
Independent flags that can be mixed and matched:
Best Practice
Enable features by default; only add configuration when:
Updates:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.