From 2f8653e487079938b2031ae4580099e1857d06c8 Mon Sep 17 00:00:00 2001 From: PhilRunninger Date: Thu, 4 Apr 2024 19:19:31 -0400 Subject: [PATCH] Make the setting of terminal colors optional. --- README.md | 1 + lua/ayu/config.lua | 1 + lua/ayu/init.lua | 4 +++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 87a2810..f4645c8 100644 --- a/README.md +++ b/README.md @@ -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. }) ``` diff --git a/lua/ayu/config.lua b/lua/ayu/config.lua index 2eba1ef..40c667f 100644 --- a/lua/ayu/config.lua +++ b/lua/ayu/config.lua @@ -1,6 +1,7 @@ local config = { defaults = { mirage = false, + terminal = true, overrides = {}, }, } diff --git a/lua/ayu/init.lua b/lua/ayu/init.lua index b5b2dab..d22c37e 100644 --- a/lua/ayu/init.lua +++ b/lua/ayu/init.lua @@ -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