Skip to content

Commit 4b63d8d

Browse files
committed
feat: add vim.g.rose_pine_inactive_background
closes #39
1 parent 7b3678a commit 4b63d8d

File tree

3 files changed

+16
-8
lines changed

3 files changed

+16
-8
lines changed

Diff for: lua/rose-pine/config.lua

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ local palette = require('rose-pine.palette')
22

33
local config = {
44
bold_vert_split = vim.g.rose_pine_bold_verical_split_line or false,
5+
inactive_background = vim.g.rose_pine_inactive_background or false,
56
no_background = vim.g.rose_pine_disable_background or false,
67
no_float_background = vim.g.rose_pine_disable_float_background or false,
78
no_italics = vim.g.rose_pine_disable_italics or false,

Diff for: lua/rose-pine/theme.lua

+14-8
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,26 @@ local config = require('rose-pine.config')
22
local p = require('rose-pine.palette')
33

44
-- TODO: Refactor `maybe` logic
5-
local maybe_base = p.base
6-
local maybe_surface = p.surface
5+
local maybe_inactive_background = p.none
6+
local maybe_background = p.base
7+
local maybe_float_background = p.surface
78
local maybe_italic = 'italic'
89
local maybe_bold_vert_split = { fg = p.overlay }
910

1011
if config.bold_vert_split then
1112
maybe_bold_vert_split = { fg = p.surface, bg = p.surface }
1213
end
1314

15+
if config.inactive_background then
16+
maybe_inactive_background = p.surface
17+
end
18+
1419
if config.no_background then
15-
maybe_base = p.none
20+
maybe_background = p.none
1621
end
1722

1823
if config.no_float_background then
19-
maybe_surface = p.none
24+
maybe_float_background = p.none
2025
end
2126

2227
if config.no_italics then
@@ -52,9 +57,10 @@ local theme = {
5257
ModeMsg = { fg = p.subtle },
5358
MoreMsg = { fg = p.iris },
5459
NonText = { fg = p.inactive },
55-
Normal = { fg = p.text, bg = maybe_base },
56-
NormalFloat = { fg = p.text, bg = maybe_surface },
57-
Pmenu = { fg = p.subtle, bg = maybe_surface },
60+
Normal = { fg = p.text, bg = maybe_background },
61+
NormalNC = { fg = p.text, bg = maybe_inactive_background },
62+
NormalFloat = { fg = p.text, bg = maybe_float_background },
63+
Pmenu = { fg = p.subtle, bg = maybe_float_background },
5864
PmenuSbar = { bg = p.overlay },
5965
PmenuSel = { fg = p.text, bg = p.overlay },
6066
PmenuThumb = { bg = p.inactive },
@@ -66,7 +72,7 @@ local theme = {
6672
SpellCap = { style = 'undercurl', sp = p.subtle },
6773
SpellLocal = { style = 'undercurl', sp = p.subtle },
6874
SpellRare = { style = 'undercurl', sp = p.subtle },
69-
SignColumn = { fg = p.text, bg = maybe_base },
75+
SignColumn = { fg = p.text, bg = maybe_background },
7076
StatusLine = { fg = p.text, bg = p.surface },
7177
StatusLineNC = { fg = p.subtle, bg = p.surface },
7278
-- StatusLineTerm = {},

Diff for: readme.md

+1
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ use({
7878
vim.g.rose_pine_variant = 'dawn'
7979

8080
vim.g.rose_pine_bold_vertical_split_line = true
81+
vim.g.rose_pine_inactive_background = false
8182
vim.g.rose_pine_disable_background = false
8283
vim.g.rose_pine_disable_float_background = false
8384
vim.g.rose_pine_disable_italics = false

0 commit comments

Comments
 (0)