How can I fully disable italics with the Kanagawa theme in Neovim?

41 Views Asked by At

I really like the Kanagawa theme and want to use it in my Neovim editor. However I do not like italicized words in my code and I cannot figure out how to fully disable italics. I have this config now based on the README:

require("kanagawa").setup({
  commentStyle = { italic = false },
  keywordStyle = { italic = false },
})

And this disables most italics in the theme, however keywords like self in Rust or this in Java/Javascript are still showing italicized.

I've tried looking for answers in the repo and elsewhere, but haven't found a solution to this.

1

There are 1 best solutions below

0
WVAviator On

After digging through the source code, I found that the option "@variable.builtin" is hardcoded to italic = true. Using the overrides configuration, this particular option can be given an italic = false option:

require("kanagawa").setup({
  commentStyle = { italic = false },
  keywordStyle = { italic = false },
  overrides = function()
    return {
      ["@variable.builtin"] = { italic = false },
    }
  end
})

I opened this issue in the repo with a suggested enhancement to make this configuration more obvious.