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

View file

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