Skip to content

feat: make mode colors user-configurable via g:tabs_vim_colors#7

Merged
jesse23 merged 2 commits into
devfrom
feat/configurable-colors
Apr 4, 2026
Merged

feat: make mode colors user-configurable via g:tabs_vim_colors#7
jesse23 merged 2 commits into
devfrom
feat/configurable-colors

Conversation

@jesse23
Copy link
Copy Markdown
Owner

@jesse23 jesse23 commented Apr 4, 2026

Summary

  • Replace 14 hardcoded Dracula hi statements with a s:ApplyColors() function driven by a defaults dict
  • Users can override any subset of mode colors via g:tabs_vim_colors in their vimrc; unspecified modes fall back to Dracula defaults
  • Add ADR-002 documenting the theme contract and alternatives considered; update spec with the configuration contract and partial override example

Contract

" Each entry: [guifg, guibg, ctermfg, ctermbg] — any subset may be specified
let g:tabs_vim_colors = {
  \ 'normal': ['#282828', '#d79921', 235, 172],
  \ 'insert': ['#282828', '#b8bb26', 235, 142],
\ }

Test plan

  • Load plugin with no g:tabs_vim_colors set — Dracula defaults apply unchanged
  • Set a partial override (e.g. only normal) — overridden mode changes, others keep defaults
  • Set a full override (all 6 modes) — all highlight groups reflect custom colors

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a user-facing theming contract so mode “pill” highlight colors can be configured via g:tabs_vim_colors, while keeping Dracula as the default palette.

Changes:

  • Replaces hardcoded hi statements with an s:ApplyColors() function driven by a defaults dict and optional user overrides.
  • Documents the configuration contract and partial override example in the spec.
  • Adds ADR-002 capturing the theming decision and alternatives considered.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
plugin/tabs.vim Introduces defaults + s:ApplyColors() to generate highlight groups from merged config.
docs/specs/tabs.vim.md Specifies g:tabs_vim_colors contract, defaults, and partial override example.
docs/adrs/002.tabs-vim.themes.md ADR documenting the chosen theming configuration approach and tradeoffs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread plugin/tabs.vim Outdated
Comment thread plugin/tabs.vim
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jesse23 jesse23 merged commit c68f231 into dev Apr 4, 2026
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.

2 participants