Skip to content

Conversation

@john-mutuma
Copy link
Owner

What does this PR do?

This PR improves the MCP status component in lualine by replacing hardcoded hex colors with semantic Neovim highlight group names. This enhancement provides better theme compatibility and ensures the MCP status colors automatically adapt to the user's active colorscheme.

  • Replaces hardcoded hex colors with semantic highlight group names
  • Improves theme compatibility across different colorschemes
  • Maintains consistent visual hierarchy with diagnostic elements
  • Makes the code more maintainable and future-proof

Why is it needed?

The previous implementation used hardcoded hex colors which:

  • Did not adapt to different colorschemes
  • Could create visual inconsistencies with the overall theme
  • Made maintenance more difficult when updating color schemes
  • Didn't follow Neovim's semantic color conventions

How have the changes been tested?

  • Verified MCP status component displays correctly with semantic colors
  • Tested color adaptation across different colorschemes
  • Confirmed visual consistency with diagnostic elements
  • Validated that all MCP status states (ready, starting, error) show appropriate colors
  • No breaking changes to existing functionality

Color Mapping Changes

Status Previous Color New Highlight Group Purpose
Not Loaded #6c7086 (Gray) Comment Subtle, inactive state
Ready/Connected #50fa7b (Green) DiagnosticOk Success state
Starting/Connecting #ffb86c (Orange) DiagnosticWarn Warning/in-progress state
Error/Stopped #ff5555 (Red) DiagnosticError Error state

Screenshots (if applicable)

Not applicable - this is a code refactoring that maintains the same visual appearance while improving theme compatibility.

Checklist

  • Replaced hardcoded hex colors with semantic highlight groups
  • Maintained existing MCP status functionality
  • Improved theme compatibility
  • Code follows NairoVIM conventions
  • Commit message includes timestamp and detailed description
  • GPG signed commit
  • No breaking changes introduced
  • Ready for merge into develop branch

…us component

Improved MCP status component color configuration by switching from hardcoded hex colors to semantic Neovim highlight group names for better theme compatibility:

- Changed gray color from hex #6c7086 to 'Comment' highlight group
- Changed green color from hex #50fa7b to 'DiagnosticOk' highlight group
- Changed orange color from hex #ffb86c to 'DiagnosticWarn' highlight group
- Changed red color from hex #ff5555 to 'DiagnosticError' highlight group

This ensures the MCP status colors automatically adapt to the user's colorscheme and maintain consistent visual hierarchy with other diagnostic elements in the editor.

Signed-off-by: John Mutuma <johnmutuma@microsoft.com>
@john-mutuma john-mutuma merged commit 0aa6635 into develop Jul 28, 2025
@john-mutuma john-mutuma deleted the user/johnmutuma/continous-improvements branch July 28, 2025 17:06
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.

1 participant