Skip to content
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

Make the setting of terminal colors optional. #37

Merged
merged 1 commit into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ To configure the plugin, you can call `require('ayu').setup(values)`, where `val
```lua
require('ayu').setup({
mirage = false, -- Set to `true` to use `mirage` variant instead of `dark` for dark background.
terminal = true, -- Set to `false` to let terminal manage its own colors.
overrides = {}, -- A dictionary of group names, each associated with a dictionary of parameters (`bg`, `fg`, `sp` and `style`) and colors in hex.
})
```
Expand Down
1 change: 1 addition & 0 deletions lua/ayu/config.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
local config = {
defaults = {
mirage = false,
terminal = true,
overrides = {},
},
}
Expand Down
4 changes: 3 additions & 1 deletion lua/ayu/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,9 @@ function ayu.colorscheme()
vim.g.colors_name = 'ayu'

colors.generate(config.mirage)
set_terminal_colors()
if config.terminal then
set_terminal_colors()
end
set_groups()
end

Expand Down
Loading