Mofiqul / dracula.nvim

Dracula colorscheme for neovim written in Lua
MIT License
594 stars 102 forks source link

Broken highlight colors #79

Closed shinobu-uwu closed 1 year ago

shinobu-uwu commented 1 year ago

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

jradam commented 1 year ago

I am having the same issue after upgrading my Neovim. Could it be related to this? https://www.reddit.com/r/neovim/comments/12gvms4/this_is_why_your_higlights_look_different_in_90/

It seems this colorscheme does not yet support the new semantic highlight groups. Adding this code (from the linked Reddit source above) works as a temporary fix for me:

local links = {
  ['@lsp.type.namespace'] = '@namespace',
  ['@lsp.type.type'] = '@type',
  ['@lsp.type.class'] = '@type',
  ['@lsp.type.enum'] = '@type',
  ['@lsp.type.interface'] = '@type',
  ['@lsp.type.struct'] = '@structure',
  ['@lsp.type.parameter'] = '@parameter',
  ['@lsp.type.variable'] = '@variable',
  ['@lsp.type.property'] = '@property',
  ['@lsp.type.enumMember'] = '@constant',
  ['@lsp.type.function'] = '@function',
  ['@lsp.type.method'] = '@method',
  ['@lsp.type.macro'] = '@macro',
  ['@lsp.type.decorator'] = '@function',
}
for newgroup, oldgroup in pairs(links) do
  vim.api.nvim_set_hl(0, newgroup, { link = oldgroup, default = true })
end