joshdick / onedark.vim

A dark Vim/Neovim color scheme inspired by Atom's One Dark syntax theme.
MIT License
3.89k stars 533 forks source link

Bug: Scheme not working correctly after upgrading neovim 0.9.5 to 0.10.0 #333

Open theKnightsOfRohan opened 3 months ago

theKnightsOfRohan commented 3 months ago

Terminal Emulator Info

Terminal emulator(s) and their version(s) used, if applicable: iTerm2, Build 3.4.23

Output From vim --version

NVIM v0.10.0
Build type: Release
LuaJIT 2.1.1713773202
Run "nvim -V1 -v" for more info

Issue Description

In neovim 0.10.0, they seem to have renamed a lot of the treesitter highlight groups from 0.9.5, leading to a lot of the colors formerly applied by this colorscheme to revert to white. This also applies to the lsp highlighting. Here is the link to their article.

kuangliu commented 3 months ago

@theKnightsOfRohan try my fixed version: https://github.com/kuangliu/onedark.vim

theKnightsOfRohan commented 3 months ago

@kuangliu Unfortunately, the fixed version doesn't work either on 0.10.0.

kuangliu commented 3 months ago

@theKnightsOfRohan That's weird. This is my lazy config:

{
  'kuangliu/onedark.vim',
  config = function()
    vim.cmd([[colorscheme onedark]])
    vim.cmd([[set background=dark]])
  end,
},

It looks fine. image

image

theKnightsOfRohan commented 3 months ago

The red colors for me don't match @kuangliu.

0.9.5 w/ original:

Screenshot 2024-05-21 at 11 06 33 AM

0.10.0 w/ original:

Screenshot 2024-05-21 at 11 09 25 AM

0.10.0 w/ yours:

Screenshot 2024-05-21 at 11 10 32 AM
kuangliu commented 3 months ago

@theKnightsOfRohan I think that's because I change the "Identifier" color to s:foreground instead of s:red. You can try change it back. It should be the same as before. image

theKnightsOfRohan commented 3 months ago

I got it working now with your fork. Thanks!

mikesellitto commented 3 months ago

@theKnightsOfRohan I don't think this should be marked at completed, since it's still an issue in the repo (even if the fork fixes it).

@kuangliu would you mind opening a PR with the fixes you made? Thanks for those, by the way!

theKnightsOfRohan commented 3 months ago

Sorry about that. :P

kuangliu commented 3 months ago

Personally, I don't recommend nvim-0.10 users continue using this plugin. I recently switch to onedark.nvim

  {
    'navarasu/onedark.nvim',
    config = function()
      local c = require('onedark.palette').dark
      require('onedark').setup({
        highlights = {
          ['@constructor'] = { fg = c.cyan },
          ['@variable.builtin'] = { fg = c.yellow },
          ['@variable.parameter'] = { fg = c.fg },
          ['@lsp.type.parameter'] = { fg = c.fg },
          ['@punctuation.bracket'] = { fg = c.fg },
          ['@punctuation.special'] = { fg = c.blue },
          ['@punctuation.delimiter'] = { fg = c.fg },
          ['NvimTreeNormal'] = { fg = c.fg, bg = c.bg0 },
          ['NvimTreeEndOfBuffer'] = { fg = c.bg0, bg = c.bg0 },
          ['NvimTreeRootFolder'] = { fg = c.green },
        },
      })
      require('onedark').load()
    end,
  },

I tweaked a little, and it looks pretty much the same. image

theKnightsOfRohan commented 3 months ago

I instead switched to the direct lua port of this plugin and this modified the scheme as I saw fit as well, since I like my transparent background and navarasu's is a little weird about background. The lua port, ii14/onedark.nvim, is a lot easier of a transition.