Mofiqul/dracula.nvim

github github
tree-sitter-supported-colorscheme
star 168
stars
alert-circle 3
open issues
users 4
subscribers
git-branch 26
forks
CREATED

2021-06-03

UPDATED

4 months ago


TypeScript and NvimTree

Lua

✔️ Requirements

  • Neovim >= 0.5.0
  • Treesitter (optional)

#️ Supported Plugins

⬇️ Installation

Install via package manager

-- Using Packer:
use 'Mofiqul/dracula.nvim'
" Using Vim-Plug:
Plug 'Mofiqul/dracula.nvim'

🚀 Usage

-- Lua:
vim.cmd[[colorscheme dracula]]
" Vim-Script:
colorscheme dracula

If you are using lualine, you can also enable the provided theme:

Make sure to set theme as 'dracula-nvim' as dracula already exists in lualine built in themes

require('lualine').setup {
  options = {
    -- ...
    theme = 'dracula-nvim'
    -- ...
  }
}'

🔧 Configuration

If you're using lua

-- customize dracula color palette
vim.g.dracula_colors = {
  bg = "#282A36",
  fg = "#F8F8F2",
  selection = "#44475A",
  comment = "#6272A4",
  red = "#FF5555",
  orange = "#FFB86C",
  yellow = "#F1FA8C",
  green = "#50fa7b",
  purple = "#BD93F9",
  cyan = "#8BE9FD",
  pink = "#FF79C6",
  bright_red = "#FF6E6E",
  bright_green = "#69FF94",
  bright_yellow = "#FFFFA5",
  bright_blue = "#D6ACFF",
  bright_magenta = "#FF92DF",
  bright_cyan = "#A4FFFF",
  bright_white = "#FFFFFF",
  menu = "#21222C",
  visual = "#3E4452",
  gutter_fg = "#4B5263",
  nontext = "#3B4048",
}
-- show the '~' characters after the end of buffers
vim.g.dracula_show_end_of_buffer = true
-- use transparent background
vim.g.dracula_transparent_bg = true
-- set custom lualine background color
vim.g.dracula_lualine_bg_color = "#44475a"
-- set italic comment
vim.g.dracula_italic_comment = true

The same works in viml

" customize dracula color palette
lua << EOF
vim.g.dracula_colors = {
  bg = "#282A36",
  fg = "#F8F8F2",
  selection = "#44475A",
  comment = "#6272A4",
  red = "#FF5555",
  orange = "#FFB86C",
  yellow = "#F1FA8C",
  green = "#50fa7b",
  purple = "#BD93F9",
  cyan = "#8BE9FD",
  pink = "#FF79C6",
  bright_red = "#FF6E6E",
  bright_green = "#69FF94",
  bright_yellow = "#FFFFA5",
  bright_blue = "#D6ACFF",
  bright_magenta = "#FF92DF",
  bright_cyan = "#A4FFFF",
  bright_white = "#FFFFFF",
  menu = "#21222C",
  visual = "#3E4452",
  gutter_fg = "#4B5263",
  nontext = "#3B4048",
}
EOF
" Enable/disable animations
let bufferline.animation = v:true
" show the '~' characters after the end of buffers
let g:dracula_show_end_of_buffer = 1
" use transparent background
let g:dracula_transparent_bg = 1
" set custom lualine background color
let g:dracula_lualine_bg_color = "#44475a"
-- set italic comment
let g:dracula_italic_comment = 1

🎨 Importing colors for other usage

require('dracula').colors()

This will return the folowing table

colors