How to enable italics on React component attributes in vim?

Issue

I am using iTerm2 with italics enabled, and I have the following in my vimrc:

Plugin 'pangloss/vim-javascript' "
Plugin 'mxw/vim-jsx' "

set background=dark
colorscheme one
let g:one_allow_italics = 1

hi htmlArg gui=italic
hi htmlArg cterm=italic
hi Comment gui=italic
hi Comment cterm=italic
hi Type    gui=italic
hi Type    cterm=italic

Standard html attributes and comments are currently rendering in italics, but React component attributes are not. Has anyone got this working?

Solution

Turns out I was using a theme that did not enable italics for React components, switching themes fixed my issue.

Answered By – kuiro5

Answer Checked By – Candace Johnson (AngularFixing Volunteer)

Leave a Reply

Your email address will not be published.