add option to enable italics

This commit is contained in:
mvllow 2021-07-06 11:40:46 -05:00
commit bcdf026b1c
2 changed files with 7 additions and 4 deletions

View file

@ -144,7 +144,7 @@ theme.loadTreesitter = function()
-- TSAttribute = {},
TSBoolean = { fg = p.rose },
-- TSCharacter = {},
TSComment = { fg = p.subtle, style = 'italic' },
TSComment = { fg = p.subtle, style = vim.g.rose_pine_enable_italics and 'italic' },
-- TSConditional = {},
TSConstBuiltin = { fg = p.love },
-- TSConstMacro = {},
@ -169,9 +169,9 @@ theme.loadTreesitter = function()
-- TSNone = {},
-- TSNumber = {},
TSOperator = { fg = p.pine },
TSParameter = { fg = p.iris, style = 'italic' },
TSParameter = { fg = p.iris, style = vim.g.rose_pine_enable_italics and 'italic' },
-- TSParameterReference = {},
TSProperty = { fg = p.iris, style = 'italic' },
TSProperty = { fg = p.iris, style = vim.g.rose_pine_enable_italics and 'italic' },
TSPunctBracket = { fg = p.subtle },
TSPunctDelimiter = { fg = p.subtle },
TSPunctSpecial = { fg = p.subtle },
@ -189,7 +189,7 @@ theme.loadTreesitter = function()
-- TSTypeBuiltin = {},
TSURI = { fg = p.gold, style = 'underline' },
-- TSUnderline = {},
TSVariable = { fg = p.text, style = 'italic' },
TSVariable = { fg = p.text, style = vim.g.rose_pine_enable_italics and 'italic' },
TSVariableBuiltin = { fg = p.love },
}

View file

@ -52,6 +52,9 @@ colorscheme rose-pine
-- Can be 'base', 'moon', 'dawn'
vim.g.rose_pine_variant = 'base'
-- Enable italics
vim.g.rose_pine_enable_italics = true
-- Use terminal background
vim.g.rose_pine_disable_background = false
```