This is the Neovim adapter for Black Atom themes. It implements the Black Atom theme collections (JPN, Stations, Terra, and CRBN) as a Neovim colorscheme plugin. The plugin uses the adapter pattern to adapt theme files from templates using the core definitions.
- colors/: Adapted Lua files that define each colorscheme for Neovim use
- lua/black-atom/: Main plugin code
- api.lua: Public API for the plugin
- commands.lua: Command definitions
- config.lua: Configuration handling
- constants.lua: Shared constants
- highlights.lua: Highlight group definitions
- highlights/: Highlight group modules
- lsp.lua: LSP highlights
- plugins/: Plugin-specific highlights
- syntax.lua: Syntax highlighting
- ui.lua: UI component highlights
- init.lua: Main entry point
- lib/: Utility modules
- themes/: Theme definition files
- {collection}/: Theme collection directories
- black-atom-{collection}-{variant}.template.lua: Template files for adaptation
- black-atom-{collection}-{variant}.lua: Adapted theme files
- {collection}/: Theme collection directories
This repository implements the adapter pattern for Neovim:
- Template Files: Each theme has a
.template.luafile that contains template variables - Adapter Configuration: The
black-atom-adapter.jsonfile maps themes to templates - Adapted Files: The core CLI adapts
.luafiles from templates
- The core CLI reads the
black-atom-adapter.jsonfile - For each theme, it processes the corresponding template
- Template variables are replaced with values from the core theme definitions
- Adapted files are written to the appropriate locations
Template files use the Eta template syntax:
-- Example template variable
local color = "<%= theme.colors.palette.red %>"Each template includes:
- Theme metadata
- Primary colors
- Palette colors
- UI component colors
- Syntax highlighting colors
# Run checks
sh ./scripts/check.shBefore commiting changes, please run the checks.
# Run checks
sh ./scripts/check.shWhen creating new templates:
- Create a
.template.luafile in the appropriate collection directory - Use template variables for all theme properties
- Add the template to
black-atom-adapter.json - Adapt the theme using the core CLI
- If templates aren't adapting properly, check the
black-atom-adapter.jsonfile - Ensure template variable paths match the core theme structure
- Validate templates with the core CLI before deploying
When making changes to multiple themes:
- Update the templates rather than the adapted files
- Use the core CLI to re-adapt all themes
- Test changes with multiple color variants