Skip to content

Commit

Permalink
Make the setting of terminal colors optional.
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilRunninger committed Apr 5, 2024
1 parent 0a9804d commit 2f8653e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
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

0 comments on commit 2f8653e

Please sign in to comment.