luisiacc / gruvbox-baby

Gruvbox theme for neovim with full 🎄TreeSitter support.
MIT License
390 stars 28 forks source link

[Feature Request] Add styling for `@text.strong` and `@text.emphasis` #65

Closed KirkEasterson closed 1 year ago

KirkEasterson commented 1 year ago

This request is opinionated. It would be nice if the treesitter highlight groups @text.strong and @text.emphasis had styling so that "strong" text appears bold and "emphasis" text appears italic. I discovered this issue when learning neorg. I wondered why the bold and italicized text wasn't appearing correctly.

My current workaround is to manually set the highlights. It would be nice to not have to do this though.

vim.g.gruvbox_baby_highlights = {
    ["@text.strong"] = {
        fg = require('gruvbox-baby.colors').config(opts).soft_yellow,
        style = "bold",
    },
    ["@text.emphasis"] = {
        fg = require('gruvbox-baby.colors').config(opts).soft_yellow,
        style = "italic",
    },
}

The fix would be to add style = "[bold|italic]" to the necessary highlight groups in gruvbox-baby/lua/gruvbox-baby/theme.lua. I can open a PR with the changes.