Added italic comment Fix:#26
authormofiqul <mofi0islam@gmail.com>
Fri, 14 Jan 2022 11:17:01 +0000 (16:47 +0530)
committermofiqul <mofi0islam@gmail.com>
Fri, 14 Jan 2022 11:17:01 +0000 (16:47 +0530)
lua/dracula/init.lua

index 8bba1a8d86a18424015cb01be52892eb7bad687c..b017fa6cbe1511d39a20ee55a63279f52ecafc5b 100644 (file)
@@ -57,6 +57,8 @@ end
 
 M.apply = function()
 
+    local isItalic = vim.g.dracula_italic_comment == true
+
        local highlight = function(group, fg, bg, attr, sp)
                fg = fg and "guifg=" .. fg or "guifg=NONE"
                bg = bg and "guibg=" .. bg or "guibg=NONE"
@@ -75,7 +77,7 @@ M.apply = function()
                highlight("Normal", colors.fg, colors.bg, nil, nil)
        end
        highlight("NormalFloat", colors.fg, colors.bg, nil, nil)
-       highlight("Comment", colors.comment, nil, nil, nil)
+       highlight("Comment", colors.comment, nil, isItalic and 'italic' or nil, nil)
        highlight("Constant", colors.yellow, nil, nil, nil)
        highlight("String", colors.yellow, nil, nil, nil)
        highlight("Character", colors.green, nil, nil, nil)