forked from miikanissi/modus-themes.nvim
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
removed extras and renamed to pants-modus
- Loading branch information
Showing
75 changed files
with
29 additions
and
7,809 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,206 +1,9 @@ | ||
# Modus Themes | ||
|
||
[![GitHub Release](https://img.shields.io/github/v/release/miikanissi/modus-themes.nvim)](https://github.com/miikanissi/modus-themes.nvim/releases/latest) | ||
[![CI](https://github.com/miikanissi/modus-themes.nvim/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/miikanissi/modus-themes.nvim/actions/workflows/ci.yml) | ||
[![License](https://img.shields.io/github/license/miikanissi/modus-themes.nvim)](https://github.com/miikanissi/modus-themes.nvim/blob/master/LICENSE) | ||
[![WCAG AAA](https://img.shields.io/badge/WCAG%20AAA-2.1-blue)](https://www.w3.org/WAI/WCAG21/Understanding/contrast-enhanced.html) | ||
|
||
Highly accessible themes for [Neovim](https://github.com/neovim/neovim), conforming with | ||
the highest standard for color contrast between background and foreground values | ||
([WCAG AAA](https://www.w3.org/WAI/WCAG21/Understanding/contrast-enhanced.html)). This | ||
is a Neovim port of the original | ||
[Modus Themes](https://protesilaos.com/emacs/modus-themes) built for | ||
[GNU Emacs](https://www.gnu.org/software/emacs/). | ||
## PERSONAL FORK OF [`modus-themes.nvim`](https://github.com/miikanissi/modus-themes.nvim) | ||
|
||
![Modus Themes Preview](https://raw.githubusercontent.com/miikanissi/modus-themes.nvim/master/assets/modus-themes-preview.png) | ||
Changelog | ||
- | ||
|
||
## Overview | ||
|
||
The Modus Themes are designed for accessible readability. They conform with the highest | ||
standard for color contrast between background and foreground values. For small sized | ||
text, this corresponds to the | ||
[WCAG AAA standard](https://www.w3.org/WAI/WCAG21/Understanding/contrast-enhanced.html), | ||
which specifies a minimum contrast ratio of at least 7:1, while large sized and bold | ||
text have a contrast ratio of at least 4.5:1. Incidental text that is part of an | ||
inactive user interface component, or that are for pure decoration, have no contrast | ||
requirement. | ||
|
||
This is a Neovim port of the | ||
[original Modus Themes](https://protesilaos.com/emacs/modus-themes) for GNU Emacs, and | ||
follows the design philosophy. It is not intended to be an exact 1:1 correspondence with | ||
GNU Emacs, but rather follows the spirit of the design and ensures conformity to the | ||
WCAG AAA guidelines. | ||
|
||
This project is hosted on [GitHub](https://github.com/miikanissi/modus-themes.nvim/). | ||
Any issues and contributions should be directed there. | ||
|
||
## Features | ||
|
||
- Highly accessible — prioritizes color contrast and contains tinted, deuteranopia, and | ||
tritanopia theme variants | ||
- Extensive `TreeSitter` syntax highlighting and `LSP` integration | ||
- Supports most popular Neovim plugins | ||
- Switch between light (`modus_operandi`) and dark (`modus_vivendi`) mode automatically | ||
based on the background value set with `vim.o.background` | ||
- Provides [extras](#extras) to use Modus Themes with numerous other applications | ||
|
||
## Requirements | ||
|
||
- [Neovim](https://github.com/neovim/neovim) >= | ||
[0.8.0](https://github.com/neovim/neovim/releases/tag/v0.8.0) | ||
|
||
## Installation | ||
|
||
Install the theme with your preferred package manager. | ||
|
||
[lazy.nvim](https://github.com/folke/lazy.nvim) | ||
|
||
```lua | ||
{ "miikanissi/modus-themes.nvim", priority = 1000 } | ||
``` | ||
|
||
[packer.nvim](https://github.com/wbthomason/packer.nvim) | ||
|
||
```lua | ||
use({ "miikanissi/modus-themes.nvim" }) | ||
``` | ||
|
||
[vim-plug](https://github.com/junegunn/vim-plug) | ||
|
||
```vim | ||
Plug 'miikanissi/modus-themes.nvim' | ||
``` | ||
|
||
## Usage | ||
|
||
### Lua | ||
|
||
```lua | ||
vim.cmd([[colorscheme modus]]) -- modus_operandi, modus_vivendi | ||
``` | ||
|
||
### Vim Script | ||
|
||
```vim | ||
colorscheme modus " modus_operandi, modus_vivendi | ||
``` | ||
|
||
## Configuration | ||
|
||
> Ensure the configuration is set **BEFORE** loading the color scheme with | ||
> `colorscheme modus`. | ||
By default, the theme will choose between light (`modus_operandi`) and dark | ||
(`modus_vivendi`) based on the background value set with `vim.o.background`. | ||
|
||
If using the default options, there is no need to explicitly call `setup`. | ||
|
||
```lua | ||
-- Default options | ||
require("modus-themes").setup({ | ||
-- Theme comes in two styles `modus_operandi` and `modus_vivendi` | ||
-- `auto` will automatically set style based on background set with vim.o.background | ||
style = "auto", | ||
variant = "default", -- Theme comes in four variants `default`, `tinted`, `deuteranopia`, and `tritanopia` | ||
transparent = false, -- Transparent background (as supported by the terminal) | ||
dim_inactive = false, -- "non-current" windows are dimmed | ||
styles = { | ||
-- Style to be applied to different syntax groups | ||
-- Value is any valid attr-list value for `:help nvim_set_hl` | ||
comments = { italic = true }, | ||
keywords = { italic = true }, | ||
functions = {}, | ||
variables = {}, | ||
}, | ||
|
||
--- You can override specific color groups to use other groups or a hex color | ||
--- function will be called with a ColorScheme table | ||
---@param colors ColorScheme | ||
on_colors = function(colors) end, | ||
|
||
--- You can override specific highlights to use other groups or a hex color | ||
--- function will be called with a Highlights and ColorScheme table | ||
---@param highlights Highlights | ||
---@param colors ColorScheme | ||
on_highlights = function(highlights, colors) end, | ||
}) | ||
``` | ||
|
||
### Example Settings and Color Overrides | ||
|
||
```lua | ||
require("modus-themes").setup({ | ||
style = "modus_operandi", -- Always use modus_operandi regardless of `vim.o.background` | ||
variant = "deuteranopia", -- Use deuteranopia variant | ||
styles = { | ||
functions = { italic = true }, -- Enable italics for functions | ||
}, | ||
|
||
on_colors = function(colors) | ||
colors.error = colors.red_faint -- Change error color to the "faint" variant | ||
end, | ||
}) | ||
``` | ||
|
||
## Extras | ||
|
||
<!-- prettier-ignore-start --> | ||
<!-- extras:start --> | ||
|
||
- [Alacritty](https://github.com/alacritty/alacritty) ([alacritty](https://github.com/miikanissi/modus-themes.nvim/tree/master/extras/alacritty)) | ||
- [Delta](https://github.com/dandavison/delta) ([delta](https://github.com/miikanissi/modus-themes.nvim/tree/master/extras/delta)) | ||
- [Dunst](https://dunst-project.org/) ([dunst](https://github.com/miikanissi/modus-themes.nvim/tree/master/extras/dunst)) | ||
- [Fish](https://fishshell.com/docs/current/index.html) ([fish](https://github.com/miikanissi/modus-themes.nvim/tree/master/extras/fish)) | ||
- [Foot](https://codeberg.org/dnkl/foot) ([foot](https://github.com/miikanissi/modus-themes.nvim/tree/master/extras/foot)) | ||
- [GitUI](https://github.com/extrawurst/gitui) ([gitui](https://github.com/miikanissi/modus-themes.nvim/tree/master/extras/gitui)) | ||
- [iTerm](https://iterm2.com/) ([iterm](https://github.com/miikanissi/modus-themes.nvim/tree/master/extras/iterm)) | ||
- [Kitty](https://sw.kovidgoyal.net/kitty/conf.html) ([kitty](https://github.com/miikanissi/modus-themes.nvim/tree/master/extras/kitty)) | ||
- [Lua Table for testing](https://www.lua.org) ([lua](https://github.com/miikanissi/modus-themes.nvim/tree/master/extras/lua)) | ||
- [Oomox/Themix](https://github.com/themix-project/themix-gui) ([oomox](https://github.com/miikanissi/modus-themes.nvim/tree/master/extras/oomox)) | ||
- [PrismJS](https://prismjs.com) ([prismjs](https://github.com/miikanissi/modus-themes.nvim/tree/master/extras/prismjs)) | ||
- [qt5ct](https://sourceforge.net/projects/qt5ct/) ([qt5ct](https://github.com/miikanissi/modus-themes.nvim/tree/master/extras/qt5ct)) | ||
- [Terminator](https://gnome-terminator.readthedocs.io/en/latest/config.html) ([terminator](https://github.com/miikanissi/modus-themes.nvim/tree/master/extras/terminator)) | ||
- [Tilix](https://github.com/gnunn1/tilix) ([tilix](https://github.com/miikanissi/modus-themes.nvim/tree/master/extras/tilix)) | ||
- [Tmux](https://github.com/tmux/tmux/wiki) ([tmux](https://github.com/miikanissi/modus-themes.nvim/tree/master/extras/tmux)) | ||
- [WezTerm](https://wezfurlong.org/wezterm/config/files.html) ([wezterm](https://github.com/miikanissi/modus-themes.nvim/tree/master/extras/wezterm)) | ||
- [Windows Terminal](https://aka.ms/terminal-documentation) ([windows_terminal](https://github.com/miikanissi/modus-themes.nvim/tree/master/extras/windows_terminal)) | ||
- [Xfce Terminal](https://docs.xfce.org/apps/terminal/advanced) ([xfceterm](https://github.com/miikanissi/modus-themes.nvim/tree/master/extras/xfceterm)) | ||
- [Xresources](https://wiki.archlinux.org/title/X_resources) ([xresources](https://github.com/miikanissi/modus-themes.nvim/tree/master/extras/xresources)) | ||
- [Zathura](https://pwmt.org/projects/zathura/) ([zathura](https://github.com/miikanissi/modus-themes.nvim/tree/master/extras/zathura)) | ||
|
||
<!-- extras:end --> | ||
<!-- prettier-ignore-end --> | ||
|
||
## Contributing | ||
|
||
Contributions are welcome. Feel free to create a | ||
[pull request on GitHub](https://github.com/miikanissi/modus-themes.nvim/pulls) to add | ||
support for any missing plugins, or | ||
[report an issue](https://github.com/miikanissi/modus-themes.nvim/issues). | ||
|
||
Please ensure the WCAG AAA contrast requirements are met. You can use this | ||
[contrast checker](https://webaim.org/resources/contrastchecker/) for reference. | ||
|
||
[Extras](#extras) are generated using a template system. | ||
|
||
How to create a new extra template: | ||
|
||
1. Create a file such as `lua/modus-themes/extras/extra-app.lua`. | ||
2. Add the name and output file extension to the `extras` table in | ||
`lua/modus-themes/extras/init.lua`. | ||
3. Run the following command to generate new [extras](#extras) from the Modus Themes | ||
plugin directory: | ||
|
||
```sh | ||
nvim --headless "+lua require('modus-themes.extras').setup()" +qa | ||
``` | ||
|
||
4. Ensure the newly created themes in the `extras/` directory are correct. Please **DO | ||
NOT** commit them, as they are already automatically built by the CI. | ||
|
||
## Acknowledgements | ||
|
||
- [Modus Themes](https://protesilaos.com/emacs/modus-themes): Original Modus Themes for | ||
GNU Emacs | ||
- [Tokyo Night](https://github.com/folke/tokyonight.nvim): Neovim theme used for | ||
inspiration and as a base project template |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
require("modus-themes").load() | ||
require("pants-modus").load() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
require("modus-themes").load({ style = "modus_operandi" }) | ||
require("pants-modus").load({ style = "modus_operandi" }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
require("modus-themes").load({ style = "modus_vivendi" }) | ||
require("pants-modus").load({ style = "modus_vivendi" }) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.