Coder Social home page Coder Social logo

dracula.nvim's Introduction

🧛‍♂️ dracula.nvim

Dracula colorscheme for NEOVIM written in Lua

dracula.nvim

✔️ Requirements

  • Neovim >= 0.9.2
  • Treesitter (optional)

NOTICE: if you use an older version of neovim (>=0.8.0 <0.9.2), you can pin this plugin to commit 8fc749

#️ 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]]
-- or
vim.cmd[[colorscheme dracula-soft]]
" Vim-Script:
colorscheme dracula
" or:
colorscheme dracula-soft

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'
    -- ...
  }
}

If you are using LazyVim, you can add this to your plugins/colorscheme.lua file:

return {
  -- add dracula
  { "Mofiqul/dracula.nvim" },

  -- Configure LazyVim to load dracula
  {
    "LazyVim/LazyVim",
    opts = {
      colorscheme = "dracula",
    },
  },
}

🔧 Configuration

The configuration must be run before colorscheme command to take effect. To customize the 'dracula-soft' variant, include theme = 'dracula-soft' in the setup() table below.

If you're using Lua:

local dracula = require("dracula")
dracula.setup({
  -- customize dracula color palette
  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",
    white = "#ABB2BF",
    black = "#191A21",
  },
  -- show the '~' characters after the end of buffers
  show_end_of_buffer = true, -- default false
  -- use transparent background
  transparent_bg = true, -- default false
  -- set custom lualine background color
  lualine_bg_color = "#44475a", -- default nil
  -- set italic comment
  italic_comment = true, -- default false
  -- overrides the default highlights with table see `:h synIDattr`
  overrides = {},
  -- You can use overrides as table like this
  -- overrides = {
  --   NonText = { fg = "white" }, -- set NonText fg to white
  --   NvimTreeIndentMarker = { link = "NonText" }, -- link to NonText highlight
  --   Nothing = {} -- clear highlight of Nothing
  -- },
  -- Or you can also use it like a function to get color from theme
  -- overrides = function (colors)
  --   return {
  --     NonText = { fg = colors.white }, -- set NonText fg to white of theme
  --   }
  -- end,
})

🎨 Importing colors for other usage

local colors = require('dracula').colors()

This will return the following table (dracula palette shown):

colors

dracula.nvim's People

Contributors

andrem222 avatar aquaherd avatar axieax avatar b-u-f-f avatar binhtran432k avatar brenoprata10 avatar cofcat456 avatar craigmac avatar drowze avatar elkrammer avatar ema2159 avatar errantepiphany avatar francocalvo avatar fredeeb avatar giuseppemp avatar jakesjews avatar jlvcm avatar kellybrower avatar kerwood avatar kitacaze avatar magnuslarsen avatar mariasolos avatar mgerb avatar mofiqul avatar nifoc avatar olliestone avatar poegl avatar pyrrolizin avatar slybouhafs avatar zirbest avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dracula.nvim's Issues

GitSigns Current Line Blame is hard to read

Currently the text for GitSignsCurrentLineBlame is very hard to read, it's defaulting to a very dark grey color, combined with a dark background it's barely readable.

Reproduction Steps:

  1. Install Gitsigns plugin
  2. Run :Gitsigns toggle_current_line_blame

Current Output

current

Desired Output

From a UI perspective I don't know what's a good "color" suitable for this feature. For now defaulting to White makes this feature usable.

fixed

Visual Highlight for selected text might be too similar to background color on some screens

On certain screens, you can’t really see the difference between the regular background color and the text you visually selected, as the colors look so much alike.

Tried to change the values for the “visual” variable and “selection” one as well, but seems like it’s not working.

Any ideas on how to change this so that i can have a better contrast for visual selection?

Screenshot 2022-11-24 at 10 20 56 AM

Add the 'Keyword' highlight group for compatibility with some filetypes

Hello!

I just wanted to suggest a minor change to the lua/dracula/init.lua file. In some filetypes, vim uses the 'Keyword' (not to be confused with 'Keywords') highlight group to highlight text. Therefore I suggest that the maintainers add this highlight group to the list of highlight groups in the lua/dracula/init.lua file.

White background on highlight when using highlight symbols under cursor under cursor

When using the code in https://github.com/neovim/nvim-lspconfig/wiki/UI-customization#highlight-symbol-under-cursor for highlighting all the occurances of a symbol using lsp, the highlight appears as white, making the text unreadable.
image

I dont know much about colorshemes, but my guess is that problem is not implementing group = 'lsp_document_highlight' in the colorscheme. Let me know if you need any more information.
Love the work you have done btw.

Treesitter CSS highlighing won't work

image

This is if I use the 'new-improvements' branch.

image

This is from the current branch.

image

If I do :TSDisable highlight this is what it turns into.
I have highlight = { enable = true} in my Treesitter config and the rest of the languages I have install work correctly except CSS. I tried to replicate it with Catppuccin, but that theme was working fine.

Broken highlight colors

As you can see everything is blue and yellow, disabling treesitter doesn't change much. Not sure what caused this, I ran lazy sync last friday and it stopped working properly, so my guess is some plugin integration broke? Here is my config

screenshot 7

Bash highlight function name

Hello!
I find out that the function name in the function is not correct colored.

Example:
image

Dracula in VSCode:
image

Thank you!

Colors Showing up Differently on Different machines

Idk if this is for you @Mofiqul or something else, but here's what I'm seeing:

I have my minimial neovim setup on my remote development environments, using Packer as the package manager.

On my daily driver, I have a very similar setup, only using Lazy, and more plugins. But they came from the same original setup.

The color scheme renders differently for the same file. Here's a screenshot - the left is my daily driver machine, the right is my remote server. I love the look of the right environment so much more, so I'm hoping for it to show up the same way on my daily machine; I just can't seem to figure out why!

Screenshot 2023-03-27 at 3 30 26 PM

If you have any suggestions, that would be helpful! Thanks again for the great color scheme.

barbar buffer picking

barbar has implemented a buffer picking option which highlights the respective key required to move to the intended buffer.
can the highlight color be changed to fit the official dracula color (red = #ff5555) instead of the default (red = #ff0000)?

image

Change background color

Hi, I stumbled upon this recently and was wondering if and how I can change the background color when using this theme?

scope c methods are yellow not green

I've been running dracula theme for nvim for a while and can't figure out why my methods calls are yellow and not green. For example in this screenshot printf in yellow and char/string in yellow makes it hard to read, distinct between a method name and char/strings.

Installed through lazy and loading theme and using dracula.setup({ ..
what am I doing wrong?

image

Can't use the colourscheme

I'm installing it using paq.nvim. The plugin was able to succesfully install, but vim.cmd[[colorscheme dracula]] in my init.lua and :colorscheme dracula both don't work.

Using `colors()` no longer seems to work

I get the following error as of commit 2e8ce9c.

E5108: Error executing lua [string ":lua"]:89: attempt to index a nil value
stack traceback:
        [string ":lua"]:89: in main chunk

Here's the relevant lua config, which works fine with 52f6d1c.

local dracula = require("dracula")
dracula.setup({
  colors = { nontext = "#474e57" }, -- default is too low contrast
  overrides = {
    WhichKeyDesc = { fg = dracula.colors().bright_white },
    WhichKeyGroup = { fg = dracula.colors().pink },
    FloatBorder = { fg = dracula.colors().bright_white },
    FoldColumn = { fg = dracula.colors().comment },
    ColorColumn = { bg = dracula.colors().black },
    CmpItemAbbr = { fg = dracula.colors().bright_white, bg = nil },
    CmpItemAbbrMatch = { fg = dracula.colors().bright_green },
    GitSignsChange = { fg = dracula.colors().orange },
    GitSignsChangeLn = { fg = dracula.colors().orange },
    TelescopePromptBorder = { fg = dracula.colors().bright_white },
    TelescopePreviewBorder = { fg = dracula.colors().bright_white },
    TelescopeResultsBorder = { fg = dracula.colors().bright_white },
    TelescopeSelection = { fg = dracula.colors().bright_white },
    TelescopeMatching = { fg = dracula.colors().bright_green }
  }
})

No highlighting on git diffs on theme dracula on neovim

Plugin: fugitive
Command: Gdiffsplit HEAD~1
Plugin manager: lazy

Expecting: diff hightlighting

image

When changing to built-in theme slate it works

:colorscheme slate

image

Tried: loading theme first by setting priority in lazy as in the example

https://github.com/folke/lazy.nvim#examples

	{
		"Mofiqul/dracula.nvim",
		lazy = false, -- make sure we load this during startup if it is your main colorscheme
		priority = 1000, -- make sure to load this before all the other start plugins
		config = function()
			vim.g.rehash256 = 1
			vim.api.nvim_cmd({
				cmd = "colorscheme",
				args = { "dracula" },
			}, {})
		end,
	},

However... when I delete a block in my working copy, then hightlighting works.

image

Kind of solved:

I manually added this and it worked:

highlight DiffChange cterm=bold ctermfg=10 ctermbg=17 gui=none guifg=bg guibg=gray
highlight DiffText   cterm=bold ctermfg=10 ctermbg=88 gui=none guifg=bg guibg=orange

image

Does anybody know how can I change my lazygit colors? :)

I am using lunar vim but I can't find where I can change my lazygit, I did made some configurations overall on my .lua files but I can't find where can i change lazygit
image

this is my config of groups.lua

---@class Highlight
---@field fg string color name or "#RRGGBB"
---@field foreground string same fg, color name or "#RRGGBB"
---@field bg string color name or "#RRGGBB"
---@field background string same bg, color name or "#RRGGBB"
---@field sp string color name or "#RRGGBB"
---@field special string same sg, color name or "#RRGGBB"
---@field blend integer value between 0 and 100
---@field bold boolean
---@field standout boolean
---@field underline boolean
---@field undercurl boolean
---@field underdouble boolean
---@field underdotted boolean
---@field underdashed boolean
---@field strikethrough boolean
---@field italic boolean
---@field reverse boolean
---@field nocombine boolean
---@field link string name of another highlight group to link to, see |:hi-link|.
---@field default string Don't override existing definition |:hi-default|
---@field ctermfg integer Sets foreground of cterm color |highlight-ctermfg|
---@field ctermbg integer Sets background of cterm color |highlight-ctermbg|
---@field cterm table cterm attribute map, like |highlight-args|.

---setup highlight groups
---@param configs DefaultConfig
---@return table<string, Highlight>
---@nodiscard
local function setup(configs)
   local colors = configs.colors
   local endOfBuffer = {
      fg = configs.show_end_of_buffer and colors.visual or colors.bg,
   }

   return {
      Normal = { fg = colors.fg, bg = colors.bg, },
      NormalFloat = { fg = colors.fg, bg = colors.bg, },
      Comment = { fg = colors.comment, italic = configs.italic_comment, },
      Constant = { fg = colors.yellow, },
      String = { fg = colors.yellow, },
      Character = { fg = colors.green, },
      Number = { fg = colors.orange, },
      Boolean = { fg = colors.cyan, },
      Float = { fg = colors.orange, },
      FloatBorder = { fg = colors.white, },
      Operator = { fg = colors.purple, },
      Keyword = { fg = colors.cyan, },
      Keywords = { fg = colors.cyan, },
      Identifier = { fg = colors.cyan, },
      Function = { fg = colors.yellow, },
      Statement = { fg = colors.purple, },
      Conditional = { fg = colors.pink, },
      Repeat = { fg = colors.pink, },
      Label = { fg = colors.cyan, },
      Exception = { fg = colors.purple, },
      PreProc = { fg = colors.yellow, },
      Include = { fg = colors.purple, },
      Define = { fg = colors.purple, },
      Title = { fg = colors.cyan, },
      Macro = { fg = colors.purple, },
      PreCondit = { fg = colors.cyan, },
      Type = { fg = colors.cyan, },
      StorageClass = { fg = colors.pink, },
      Structure = { fg = colors.yellow, },
      TypeDef = { fg = colors.yellow, },
      Special = { fg = colors.green, italic = true },
      SpecialComment = { fg = colors.comment, italic = true, },
      Error = { fg = colors.bright_red, },
      Todo = { fg = colors.purple, bold = true, italic = true, },
      Underlined = { fg = colors.cyan, underline = true, },

      Cursor = { reverse = true, },
      CursorLineNr = { fg = colors.bright_white},

      SignColumn = { bg = colors.bg, },

      Conceal = { fg = colors.comment, },
      CursorColumn = { bg = colors.black, },
      CursorLine = { bg = colors.selection, },
      ColorColumn = { bg = colors.selection, },

      StatusLine = { fg = colors.white, bg = colors.black, },
      StatusLineNC = { fg = colors.comment, },
      StatusLineTerm = { fg = colors.white, bg = colors.black, },
      StatusLineTermNC = { fg = colors.comment, },

      Directory = { fg = colors.cyan, },
      DiffAdd = { fg = colors.bg, bg = colors.green, },
      DiffChange = { fg = colors.orange, },
      DiffDelete = { fg = colors.red, },
      DiffText = { fg = colors.comment, },

      ErrorMsg = { fg = colors.bright_red, },
      VertSplit = { fg = colors.black, },
      Folded = { fg = colors.comment, },
      FoldColumn = {},
      Search = { fg = colors.black, bg = colors.orange, },
      IncSearch = { fg = colors.orange, bg = colors.comment, },
      LineNr = { fg = colors.comment, },
      MatchParen = { fg = colors.fg, underline = true, },
      NonText = { fg = colors.nontext, },
      Pmenu = { fg = colors.white, bg = colors.menu, },
      PmenuSel = { fg = colors.white, bg = colors.selection, },
      PmenuSbar = { bg = colors.bg, },
      PmenuThumb = { bg = colors.selection, },

      Question = { fg = colors.purple, },
      QuickFixLine = { fg = colors.black, bg = colors.yellow, },
      SpecialKey = { fg = colors.nontext, },

      SpellBad = { fg = colors.bright_red, underline = true, },
      SpellCap = { fg = colors.yellow, },
      SpellLocal = { fg = colors.yellow, },
      SpellRare = { fg = colors.yellow, },

      TabLine = { fg = colors.comment, },
      TabLineSel = { fg = colors.white, },
      TabLineFill = { bg = colors.bg, },
      Terminal = { fg = colors.white, bg = colors.black, },
      Visual = { bg = colors.visual, },
      VisualNOS = { fg = colors.visual, },
      WarningMsg = { fg = colors.yellow, },
      WildMenu = { fg = colors.black, bg = colors.white, },

      EndOfBuffer = endOfBuffer,

      -- TreeSitter
      ['@error'] = { fg = colors.error, },
      ['@punctuation.delimiter'] = { fg = colors.fg, },
      ['@punctuation.bracket'] = { fg = colors.fg, },
      ['@punctuation.special'] = { fg = colors.cyan, },

      ['@constant'] = { fg = colors.purple, },
      ['@constant.builtin'] = { fg = colors.purple, },
      ['@symbol'] = { fg = colors.purple, },

      ['@constant.macro'] = { fg = colors.cyan, },
      ['@string.regex'] = { fg = colors.red, },
      ['@string'] = { fg = colors.yellow, },
      ['@string.escape'] = { fg = colors.cyan, },
      ['@character'] = { fg = colors.green, },
      ['@number'] = { fg = colors.purple, },
      ['@boolean'] = { fg = colors.purple, },
      ['@float'] = { fg = colors.green, },
      ['@annotation'] = { fg = colors.yellow, },
      ['@attribute'] = { fg = colors.cyan, },
      ['@namespace'] = { fg = colors.orange, },

      ['@function.builtin'] = { fg = colors.cyan, },
      ['@function'] = { fg = colors.green, },
      ['@function.macro'] = { fg = colors.green, },
      ['@parameter'] = { fg = colors.orange, },
      ['@parameter.reference'] = { fg = colors.orange, },
      ['@method'] = { fg = colors.green, },
      ['@field'] = { fg = colors.orange, },
      ['@property'] = { fg = colors.purple, },
      ['@constructor'] = { fg = colors.cyan, },

      ['@conditional'] = { fg = colors.pink, },
      ['@repeat'] = { fg = colors.pink, },
      ['@label'] = { fg = colors.cyan, },

      ['@keyword'] = { fg = colors.pink, },
      ['@keyword.function'] = { fg = colors.cyan, },
      ['@keyword.operator'] = { fg = colors.pink, },
      ['@operator'] = { fg = colors.pink, },
      ['@exception'] = { fg = colors.purple, },
      ['@type'] = { fg = colors.bright_cyan, },
      ['@type.builtin'] = { fg = colors.cyan, italic = true, },
      ['@type.qualifier'] = { fg = colors.pink, },
      ['@structure'] = { fg = colors.purple, },
      ['@include'] = { fg = colors.pink, },

      ['@variable'] = { fg = colors.fg, },
      ['@variable.builtin'] = { fg = colors.purple, },

      ['@text'] = { fg = colors.orange, },
      ['@text.strong'] = { fg = colors.orange, bold = true, }, -- bold
      ['@text.emphasis'] = { fg = colors.yellow, italic = true, }, -- italic
      ['@text.underline'] = { fg = colors.orange, },
      ['@text.title'] = { fg = colors.pink, bold = true, }, -- title
      ['@text.literal'] = { fg = colors.yellow, }, -- inline code
      ['@text.uri'] = { fg = colors.yellow, italic = true, }, -- urls
      ['@text.reference'] = { fg = colors.orange, bold = true, },

      ['@tag'] = { fg = colors.cyan, },
      ['@tag.attribute'] = { fg = colors.green, },
      ['@tag.delimiter'] = { fg = colors.cyan, },

        -- Semantic 
      ['@class'] = { fg = colors.cyan },
      ['@struct'] = { fg = colors.cyan },
      ['@enum'] = { fg = colors.cyan },
      ['@enumMember'] = { fg = colors.purple },
      ['@event'] = { fg = colors.cyan },
      ['@interface'] = { fg = colors.cyan },
      ['@modifier'] = { fg = colors.cyan },
      ['@regexp'] = { fg = colors.yellow },
      ['@typeParameter'] = { fg = colors.cyan },
      ['@decorator'] = { fg = colors.cyan },

      -- HTML
      htmlArg = { fg = colors.green, },
      htmlBold = { fg = colors.yellow, bold = true, },
      htmlEndTag = { fg = colors.cyan, },
      htmlH1 = { fg = colors.pink, },
      htmlH2 = { fg = colors.pink, },
      htmlH3 = { fg = colors.pink, },
      htmlH4 = { fg = colors.pink, },
      htmlH5 = { fg = colors.pink, },
      htmlH6 = { fg = colors.pink, },
      htmlItalic = { fg = colors.purple, italic = true, },
      htmlLink = { fg = colors.purple, underline = true, },
      htmlSpecialChar = { fg = colors.yellow, },
      htmlSpecialTagName = { fg = colors.cyan, },
      htmlTag = { fg = colors.cyan, },
      htmlTagN = { fg = colors.cyan, },
      htmlTagName = { fg = colors.cyan, },
      htmlTitle = { fg = colors.white, },

      -- Markdown
      markdownBlockquote = { fg = colors.yellow, italic = true, },
      markdownBold = { fg = colors.orange, bold = true, },
      markdownCode = { fg = colors.green, },
      markdownCodeBlock = { fg = colors.orange, },
      markdownCodeDelimiter = { fg = colors.red, },
      markdownH1 = { fg = colors.pink, bold = true, },
      markdownH2 = { fg = colors.pink, bold = true, },
      markdownH3 = { fg = colors.pink, bold = true, },
      markdownH4 = { fg = colors.pink, bold = true, },
      markdownH5 = { fg = colors.pink, bold = true, },
      markdownH6 = { fg = colors.pink, bold = true, },
      markdownHeadingDelimiter = { fg = colors.red, },
      markdownHeadingRule = { fg = colors.comment, },
      markdownId = { fg = colors.purple, },
      markdownIdDeclaration = { fg = colors.cyan, },
      markdownIdDelimiter = { fg = colors.purple, },
      markdownItalic = { fg = colors.yellow, italic = true, },
      markdownLinkDelimiter = { fg = colors.purple, },
      markdownLinkText = { fg = colors.pink, },
      markdownListMarker = { fg = colors.cyan, },
      markdownOrderedListMarker = { fg = colors.red, },
      markdownRule = { fg = colors.comment, },

      --  Diff
      diffAdded = { fg = colors.green, },
      diffRemoved = { fg = colors.red, },
      diffFileId = { fg = colors.yellow, bold = true, reverse = true, },
      diffFile = { fg = colors.nontext, },
      diffNewFile = { fg = colors.green, },
      diffOldFile = { fg = colors.red, },

      debugPc = { bg = colors.cyan, },
      debugBreakpoint = { fg = colors.red, reverse = true, },

      -- Git Signs
      GitSignsAdd = { fg = colors.bright_green, },
      GitSignsChange = { fg = colors.cyan, },
      GitSignsDelete = { fg = colors.bright_red, },
      GitSignsAddLn = { fg = colors.black, bg = colors.bright_green, },
      GitSignsChangeLn = { fg = colors.black, bg = colors.cyan, },
      GitSignsDeleteLn = { fg = colors.black, bg = colors.bright_red, },
      GitSignsCurrentLineBlame = { fg = colors.white, },

      -- Telescope
      TelescopePromptBorder = { fg = colors.comment, },
      TelescopeResultsBorder = { fg = colors.comment, },
      TelescopePreviewBorder = { fg = colors.comment, },
      TelescopeSelection = { fg = colors.white, bg = colors.selection, },
      TelescopeMultiSelection = { fg = colors.purple, bg = colors.selection, },
      TelescopeNormal = { fg = colors.fg, bg = colors.bg, },
      TelescopeMatching = { fg = colors.green, },
      TelescopePromptPrefix = { fg = colors.purple, },

      -- NvimTree
      NvimTreeNormal = { fg = colors.fg, bg = colors.menu, },
      NvimTreeVertSplit = { fg = colors.bg, bg = colors.bg, },
      NvimTreeRootFolder = { fg = colors.purple,  },
      NvimTreeGitDirty = { fg = colors.orange, },
      NvimTreeGitNew = { fg = colors.bright_green, },
      NvimTreeImageFile = { fg = colors.pink, },
      NvimTreeFolderIcon = { fg = colors.purple, },
      NvimTreeIndentMarker = { fg = colors.purple, },
      NvimTreeEmptyFolderName = { fg = colors.comment, },
      NvimTreeFolderName = { fg = colors.fg, },
      NvimTreeSpecialFile = { fg = colors.pink, underline = true, },
      NvimTreeOpenedFolderName = { fg = colors.fg, },
      NvimTreeCursorLine = { bg = colors.selection, },
      NvimTreeIn = { bg = colors.selection, },

      NvimTreeEndOfBuffer = endOfBuffer,

      -- NeoTree
      NeoTreeNormal = { fg = colors.fg, bg = colors.menu, },
      NeoTreeNormalNC = { fg = colors.fg, bg = colors.menu, },
      NeoTreeDirectoryName = { fg = colors.fg },
      NeoTreeGitUnstaged = { fg = colors.bright_magenta },
      NeoTreeGitModified = { fg = colors.bright_magenta },
      NeoTreeGitUntracked = { fg = colors.bright_green },
      NeoTreeDirectoryIcon = { fg = colors.purple },
      NeoTreeIndentMarker = { fg = colors.nontext },
      NeoTreeDotfile = { fg = colors.comment },

      -- Bufferline
      BufferLineIndicatorSelected = { fg = colors.purple, },
      BufferLineFill = { bg = colors.black, },
      BufferLineBufferSelected = { bg = colors.bg, },

      -- LSP
      DiagnosticError = { fg = colors.red, },
      DiagnosticWarn = { fg = colors.yellow, },
      DiagnosticInfo = { fg = colors.cyan, },
      DiagnosticHint = { fg = colors.cyan, },
      DiagnosticUnderlineError = { undercurl = true, sp = colors.red, },
      DiagnosticUnderlineWarn = { undercurl = true, sp = colors.yellow, },
      DiagnosticUnderlineInfo = { undercurl = true, sp = colors.cyan, },
      DiagnosticUnderlineHint = { undercurl = true, sp = colors.cyan, },
      DiagnosticSignError = { fg = colors.red, },
      DiagnosticSignWarn = { fg = colors.yellow, },
      DiagnosticSignInfo = { fg = colors.cyan, },
      DiagnosticSignHint = { fg = colors.cyan, },
      DiagnosticFloatingError = { fg = colors.red, },
      DiagnosticFloatingWarn = { fg = colors.yellow, },
      DiagnosticFloatingInfo = { fg = colors.cyan, },
      DiagnosticFloatingHint = { fg = colors.cyan, },
      DiagnosticVirtualTextError = { fg = colors.red, },
      DiagnosticVirtualTextWarn = { fg = colors.yellow, },
      DiagnosticVirtualTextInfo = { fg = colors.cyan, },
      DiagnosticVirtualTextHint = { fg = colors.cyan, },

      LspDiagnosticsDefaultError = { fg = colors.red, },
      LspDiagnosticsDefaultWarning = { fg = colors.yellow, },
      LspDiagnosticsDefaultInformation = { fg = colors.cyan, },
      LspDiagnosticsDefaultHint = { fg = colors.cyan, },
      LspDiagnosticsUnderlineError = { fg = colors.red, undercurl = true, },
      LspDiagnosticsUnderlineWarning = { fg = colors.yellow, undercurl = true, },
      LspDiagnosticsUnderlineInformation = { fg = colors.cyan, undercurl = true, },
      LspDiagnosticsUnderlineHint = { fg = colors.cyan, undercurl = true, },
      LspReferenceText = { fg = colors.orange, },
      LspReferenceRead = { fg = colors.orange, },
      LspReferenceWrite = { fg = colors.orange, },
      LspCodeLens = { fg = colors.cyan, },

      --LSP Saga
      LspFloatWinNormal = { fg = colors.fg, },
      LspFloatWinBorder = { fg = colors.comment, },
      LspSagaHoverBorder = { fg = colors.comment, },
      LspSagaSignatureHelpBorder = { fg = colors.comment, },
      LspSagaCodeActionBorder = { fg = colors.comment, },
      LspSagaDefPreviewBorder = { fg = colors.comment, },
      LspLinesDiagBorder = { fg = colors.comment, },
      LspSagaRenameBorder = { fg = colors.comment, },
      LspSagaBorderTitle = { fg = colors.menu, },
      LSPSagaDiagnosticTruncateLine = { fg = colors.comment, },
      LspSagaDiagnosticBorder = { fg = colors.comment, },
      LspSagaShTruncateLine = { fg = colors.comment, },
      LspSagaDocTruncateLine = { fg = colors.comment, },
      LspSagaLspFinderBorder = { fg = colors.comment, },

      -- IndentBlankLine
      IndentBlanklineContextChar = { fg = colors.bright_red, nocombine = true, },

      -- Nvim compe
      CmpItemAbbrDeprecated = { fg = colors.white, bg = colors.menu, },
      CmpItemAbbrMatch = { fg = colors.cyan, bg = colors.menu, },

      --barbar
      BufferCurrentTarget = { fg = colors.red, },
      BufferVisibleTarget = { fg = colors.red, },
      BufferInactiveTarget = { fg = colors.red, },

      -- Compe
      CompeDocumentation = { link = "Pmenu" },
      CompeDocumentationBorder = { link = "Pmenu" },

      -- Cmp
      CmpItemKind = { link = "Pmenu" },
      CmpItemAbbr = { link = "Pmenu" },
      CmpItemKindMethod = { link = "@method" },
      CmpItemKindText = { link = "@text" },
      CmpItemKindFunction = { link = "@function" },
      CmpItemKindConstructor = { link = "@type" },
      CmpItemKindVariable = { link = "@variable" },
      CmpItemKindClass = { link = "@type" },
      CmpItemKindInterface = { link = "@type" },
      CmpItemKindModule = { link = "@namespace" },
      CmpItemKindProperty = { link = "@property" },
      CmpItemKindOperator = { link = "@operator" },
      CmpItemKindReference = { link = "@parameter.reference" },
      CmpItemKindUnit = { link = "@field" },
      CmpItemKindValue = { link = "@field" },
      CmpItemKindField = { link = "@field" },
      CmpItemKindEnum = { link = "@field" },
      CmpItemKindKeyword = { link = "@keyword" },
      CmpItemKindSnippet = { link = "@text" },
      CmpItemKindColor = { link = "DevIconCss" },
      CmpItemKindFile = { link = "TSURI" },
      CmpItemKindFolder = { link = "TSURI" },
      CmpItemKindEvent = { link = "@constant" },
      CmpItemKindEnumMember = { link = "@field" },
      CmpItemKindConstant = { link = "@constant" },
      CmpItemKindStruct = { link = "@structure" },
      CmpItemKindTypeParameter = { link = "@parameter" },

      -- navic
      NavicIconsFile = { link = "CmpItemKindFile" },
      NavicIconsModule = { link = "CmpItemKindModule" },
      NavicIconsNamespace = { link = "CmpItemKindModule" },
      NavicIconsPackage = { link = "CmpItemKindModule" },
      NavicIconsClass = { link = "CmpItemKindClass" },
      NavicIconsMethod = { link = "CmpItemKindMethod" },
      NavicIconsProperty = { link = "CmpItemKindProperty" },
      NavicIconsField = { link = "CmpItemKindField" },
      NavicIconsConstructor = { link = "CmpItemKindConstructor" },
      NavicIconsEnum = { link = "CmpItemKindEnum" },
      NavicIconsInterface = { link = "CmpItemKindInterface" },
      NavicIconsFunction = { link = "CmpItemKindFunction" },
      NavicIconsVariable = { link = "CmpItemKindVariable" },
      NavicIconsConstant = { link = "CmpItemKindConstant" },
      NavicIconsString = { link = "String" },
      NavicIconsNumber = { link = "Number" },
      NavicIconsBoolean = { link = "Boolean" },
      NavicIconsArray = { link = "CmpItemKindClass" },
      NavicIconsObject = { link = "CmpItemKindClass" },
      NavicIconsKey = { link = "CmpItemKindKeyword" },
      NavicIconsKeyword = { link = "CmpItemKindKeyword" },
      NavicIconsNull = { fg = "blue" },
      NavicIconsEnumMember = { link = "CmpItemKindEnumMember" },
      NavicIconsStruct = { link = "CmpItemKindStruct" },
      NavicIconsEvent = { link = "CmpItemKindEvent" },
      NavicIconsOperator = { link = "CmpItemKindOperator" },
      NavicIconsTypeParameter = { link = "CmpItemKindTypeParameter" },
      NavicText = { fg = 'gray' },
      NavicSeparator = { fg = 'gray' },


      -- TS rainbow colors
      rainbowcol1 = { fg = colors.red, },
      rainbowcol2 = { fg = colors.green, },
      rainbowcol3 = { fg = colors.yellow, },
      rainbowcol4 = { fg = colors.purple, },
      rainbowcol5 = { fg = colors.pink, },
      rainbowcol6 = { fg = colors.cyan, },
      rainbowcol7 = { fg = colors.white, },
   }
end

return {
   setup = setup,
}

Theme not rendering properly

OS: Windows 10 pro ( wsl 2 )
neovim : 0.6.1
All terminals are installed in windows

WezTerm with darkplus theme
image

WezTerm with your dracula theme
image

windows Terminal with darkplus theme
image

Window Terminal with your theme
image

I really like the screenshot that you have posted in subredit it would be awesome if I achieve that 🤔

Floating window in lsp_signature.nvim looks wrong

When using the dracula theme with lsp_signature.nvim the floating window looks very bad. Since the looks are colorscheme related according to the lsp_signature.nvim FAQ, someone might want look into fixing it for everyone:

Q:I do not like the pop window background highlight, how to change it?

A: Redefine your NormalFloat and FloatBorder, esp if your colorscheme dose not define it.

image

This is how the floating window looks with the colorscheme nord:

image

listchars almost unreadable

When doing something like set list listchars=tab:>\ ,trail:-,eol:$ vim will display eols, tabs and spaces. The SpecialKey chars like the $ at the eol are not really visible:
image

Is there an easy way to fix this?

How to style Telescope window title colours?

Hi,

I started using this plugin and its great for syntax highlighting. However I noticed there are a few things which aren't coloured correctly. I was able to fix the main greeter page.

I'm using astronvim as a base for my neovim config.

I was wondering if it was possible to colour the titles in the telescope window that opens. I believe this was the case in default colour scheme.

What I meant by titles is Find Files Results etc etc.

image

Any help would be great thanks! Let me know if you need more details.

Link to my config: https://gitlab.com/hmajid2301/dotfiles/-/blob/main/nvim/lua/user/plugins/user.lua

Poor visibility of some ui elements

Not sure if this is intended behaviour, but colors in my setup differ very much from the original vim theme. This makes some symbols (like split window separators, out-of-file line symbols ~ and other stuff) barey visible.

  • dracula.nvim, with termguicolors (barely visible split and ~, less vibrant colors, but more colors)
    dracula_nvim_termguicolors

  • dracula/vim without termguicolors (objectively best looking, but no 24-bit color support...) changed my mind when finaly checked other languages...
    dracula_std_notermguicolors

  • dracula/vim with termguicolors (possibly something wrong with my setup?)
    dracula_std_termguicolors

Also is creating support for chadtree possible?

edit: I've checked other languages and see that there are more dracula colors used, but reduced visibility of ~ still remains.

Recommendation customization

I will recommend to make a variables for the warnings so once you change that then all diagnostics will change like the warn diagnostic I change only diagnosticwarn and all the other ones change as well that are warn type.

Basic LSP setup not supported by colorscheme

Hi there, love this colorscheme. It's seriously amazing. I've noticed that it doesn't yet support the diagnostic highlights that are used by a basic neovim LSP setup. For example:
2022-01-26_18:59:57_screenshot

2022-01-26_18:00:27_screenshot

Here's my whole LSP setup:

  use {
    'neovim/nvim-lspconfig',
    config = function()
      local lspconfig = require('lspconfig')
      local on_attach = function(_, bufnr)
        local function bufmap(mode, binding, action) vim.api.nvim_buf_set_keymap(bufnr, mode, binding, action, {noremap = true}) end
        local function bufoption(...) vim.api.nvim_buf_set_option(bufnr, ...) end
        bufoption('omnifunc', 'v:lua.vim.lsp.omnifunc')
        bufmap('n', '<leader>lD', '<cmd>lua vim.lsp.buf.declaration()<CR>')
        bufmap('n', '<leader>ld', '<cmd>lua vim.lsp.buf.definition()<CR>')
        bufmap('n', '<leader>lk', '<cmd>lua vim.lsp.buf.hover()<CR>')
        bufmap('n', '<leader>li', '<cmd>lua vim.lsp.buf.implementation()<CR>')
        bufmap('n', '<leader>lK', '<cmd>lua vim.lsp.buf.signature_help()<CR>')
        bufmap('n', '<leader>lr', '<cmd>lua vim.lsp.buf.rename()<CR>')
        bufmap('n', '<leader>lf', '<cmd>lua vim.lsp.buf.formatting()<CR>')
        bufmap('v', '<leader>lf', '<cmd>lua vim.lsp.buf.range_formatting({})<CR>')
      end

      local servers = { 'clojure_lsp', 'sumneko_lua' }
      for _, lsp in ipairs(servers) do
        lspconfig[lsp].setup {
          on_attach = on_attach,
          flags = {
            debounce_text_changes = 150,
          }
        }
      end

      vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = "single" })
      vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { border = "single" })

    end
  }

As you can see, pretty basic. The issue seems to be that the basic LSP setup uses the Diagnostic* highlight groups which aren't currently supported by this colorscheme. Here's the docs on them:
https://neovim.io/doc/user/diagnostic.html

You can see that lualine actually defaults to these highlight groups for LSP releated colors:
https://github.com/nvim-lualine/lualine.nvim/blob/b18b7ee8acf877a603c21b28b9a4d9c08bbd9594/lua/lualine/components/diagnostics/config.lua#L27

Transperant bg in readme is wrong

In my neovim config in viml
let g:dracula_transparent_bg = 1
does not work
let g:dracula_transparent_bg = v:true
seems to work fine for me though.
BTW, thanks for the neovim port!

Add comment Italic

Thank you for your work. I like your theme very much. I hope you can add this function in your spare time.

Theme is brown somehow

I used Vim-Plug and this is what my theme looks like in Neovim:
Screen Shot 2022-09-07 at 1 20 18 PM

What did I do wrong here ? It looks right in VS Code. Not here though.

Configuration with LazyVim

I am trying to configure Dracula in LazyVim but I have a problem with default groups and its overrides.

LazyVim needs to configure plugins that way: https://www.lazyvim.org/configuration/plugins#%EF%B8%8F-customizing-plugin-specs and https://www.lazyvim.org/plugins/colorscheme

I made something like this:

-- lua/plugins/colorscheme.lua
return {
  {
    "Mofiqul/dracula.nvim",
    opts = function()
      local colors = require("dracula").colors()
      colors.selection = "#454158" -- Dracula PRO

      -- helpers from Tokyonight
      ---@param c  string
      local function hexToRgb(c)
        c = string.lower(c)
        return { tonumber(c:sub(2, 3), 16), tonumber(c:sub(4, 5), 16), tonumber(c:sub(6, 7), 16) }
      end

      ---@param foreground string foreground color
      ---@param background string background color
      ---@param alpha number|string number between 0 and 1. 0 results in bg, 1 results in fg
      local function blend(foreground, background, alpha)
        alpha = type(alpha) == "string" and (tonumber(alpha, 16) / 0xff) or alpha
        local bg = hexToRgb(background)
        local fg = hexToRgb(foreground)

        local blendChannel = function(i)
          local ret = (alpha * fg[i] + ((1 - alpha) * bg[i]))
          return math.floor(math.min(math.max(0, ret), 255) + 0.5)
        end

        return string.format("#%02x%02x%02x", blendChannel(1), blendChannel(2), blendChannel(3))
      end

      local function darken(hex, amount, bg)
        return blend(hex, bg or colors.bg, amount)
      end

      return {
        colors = colors,
        show_end_of_buffer = true, -- default false
        transparent_bg = true, -- default false
        lualine_bg_color = "#44475a", -- default nil
        italic_comment = true, -- default false
        overrides = {
          -- Alpha
          AlphaShortcut = { fg = colors.green },
          AlphaHeader = { fg = colors.purple },
          AlphaHeaderLabel = { fg = colors.orange },
          AlphaFooter = { fg = colors.yellow, italic = true },
          AlphaButtons = { fg = colors.cyan },

          -- Diffview
          DiffAdd = { bg = darken(colors.bright_green, 0.15) },
          DiffDelete = { fg = colors.bright_red },
          DiffChange = { bg = darken(colors.comment, 0.15) },
          DiffText = { bg = darken(colors.comment, 0.50) },

          -- illuminate
          illuminatedWord = { bg = darken(colors.comment, 0.65) },
          illuminatedCurWord = { bg = darken(colors.comment, 0.65) },
          IlluminatedWordText = { bg = darken(colors.comment, 0.65) },
          IlluminatedWordRead = { bg = darken(colors.comment, 0.65) },
          IlluminatedWordWrite = { bg = darken(colors.comment, 0.65) },

          -- Notify
          -- Border
          -- NotifyERRORBorder = { fg = colors.fg, bg = colors.bg },
          -- NotifyWARNBorder = { fg = colors.fg, bg = colors.bg },
          -- NotifyINFOBorder = { fg = colors.fg, bg = colors.bg },
          -- NotifyDEBUGBorder = { fg = colors.fg, bg = colors.bg },
          -- NotifyTRACEBorder = { fg = colors.fg, bg = colors.bg },

          -- Body
          NotifyERRORBody = { fg = colors.fg, bg = colors.bg },
          NotifyWARNBody = { fg = colors.fg, bg = colors.bg },
          NotifyINFOBody = { fg = colors.fg, bg = colors.bg },
          NotifyDEBUGBody = { fg = colors.fg, bg = colors.bg },
          NotifyTRACEBody = { fg = colors.fg, bg = colors.bg },
        },
      }
    end,
  },

  {
    "LazyVim/LazyVim",
    opts = {
      colorscheme = "dracula",
    },
  },
}

I reloaded it and colors from overrides works but from groups not. Is there a way to make it work with LazyVim?

`dracula_transparent_bg` doesn't seem to work anymore

I've been using this theme for a while with dracula_transparent_bg enabled, and never ran into any problems. However, recently I updated all of my plugins (also updated to nvim 0.6.0, so that could be the issue here?) and that option doesn't seem to do anything any longer.

`lualine_bg_color` doesn't work

I have this for setting up dracula.nvim:

local dracula = require("dracula")

dracula.setup({
	transparent_bg = true,
	lualine_bg_color = "#44475a",
	overrides = {
		VertSplit = { fg = dracula.colors().selection },
	},
})

vim.cmd("colorscheme dracula")

I also have this for lualine:

require("lualine").setup({
    options = {
        icons_enabled = true,
        theme = "auto",
        component_separators = { left = "", right = "" },
        section_separators = { left = "", right = "" },
        disabled_filetypes = {},
        always_divide_middle = true,
    },
    sections = {
        lualine_a = { {
            "mode",
            color = { gui = "bold" },
        } },
        lualine_b = { "branch", { "diagnostics", sources = { "nvim_diagnostic" } } },
        lualine_c = { "filename" },
        lualine_x = { "fileformat", "filetype" },
        lualine_y = { "progress" },
        lualine_z = { "location" },
    },
    inactive_sections = {
        lualine_a = {},
        lualine_b = {},
        lualine_c = { "filename" },
        lualine_x = { "location" },
        lualine_y = {},
        lualine_z = {},
    },
    tabline = {},
    extensions = {},
})

lualine's background color isn't changing though.

Error after updating plugins

Hi,

I just updated all my plugins with vim-plug and now I get an error from dracula.nvim when I launch my nvim, here is how it complains :

Erreur détectée en traitant /home/oguere/.config/nvim/init.vim[3]../home/oguere/.nvimrc[50]../home/oguere/.local/share/nvim/plugged/dracula.nvim/colors/dracula.lua :
E5113: Error while calling lua chunk: ...cal/share/nvim/plugged/dracula.nvim/lua/dracula/init.lua:71: 'bg' must be string or integer
stack traceback:
        [C]: in function 'nvim_set_hl'
        ...cal/share/nvim/plugged/dracula.nvim/lua/dracula/init.lua:71: in function 'apply'
        ...cal/share/nvim/plugged/dracula.nvim/lua/dracula/init.lua:105: in function 'load'
        ...local/share/nvim/plugged/dracula.nvim/colors/dracula.lua:1: in main chunk

I had a look at ~/.local/share/nvim/plugged/dracula.nvim/colors/dracula.lua and couldn't find what's wrong. BTW I haven't changed any settings.
Any Idea how to fix this ? (Holy crap the default color scheme looks hideous)

Thanks

Weird green highlight in the scripts

Hi!
When I was editing the script in bash or editing the neovim config. Some of the characters are highlighted to green like in screenshot:

image

Could you help me with that issue?

Thank you!
Marcin

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.