shaunsingh / solarized.nvim

Port of the Solarized colorscheme for vim, written in lua, with treesitter support.
GNU General Public License v2.0
178 stars 37 forks source link

"vim.g.solarized_italic_variables = true" not working #24

Open julj opened 2 weeks ago

julj commented 2 weeks ago

The option vim.g.solarized_italic_variables does not seem to work in my configuration. The screenshot shows that nbFiles2Process is properly detected as a variable (cursor on the variable + :Inspect), but it is not italicized. I tried vim.g.solarized_italic_functions = true, and it correctly italicized my functions.

solarized.lua

return {
    'shaunsingh/solarized.nvim',
    config = function()
        vim.g.solarized_italic_variables = true
        require('solarized').set()
    end
}

image

julj commented 2 weeks ago

The variables seems to not be identified as syntax.Identifier, which is the object on which the italicizing should be applied.

theme.lua

if vim.g.solarized_italic_variables == true then
    syntax.Identifier =             {fg = solarized.gray, bg = solarized.none, style = 'italic'}; -- any variable name
else
        syntax.Identifier =             {fg = solarized.gray}; -- any variable name
end