Neovim interprets a built-in colorscheme differently when the same file is used in my user directory.

nvim (and vim) both ship with a built-in colorscheme named delek.

I copied /usr/local/share/nvim/runtime/colors/delek.vim (an unmodified file from the nvim installation) to my local directory: ~/.config/nvim/colors/delek_local.vim and changed only the name of the file and the name of the colorscheme inside that file:

let g:colors_name = "delek_local"

I then run nvim with no configuration:

% nvim -u NORC

and create a very basic python file like below just to see some highlighting:

# comment
def foo():
    return 'string'

Next enable syntax highlighting: :set syn=python

Next set the colorscheme to the built-in delek: :colo delek

I see a color change at this point, which is expected.

Next set the colorscheme to the local copy, delek_local: :colo delek_local

The colors change!

This doesn't make any sense to me. It's literally the same exact colorscheme file copied from location a to location b with only a name change. I get the same behavior when copying other built-in color files locally, and the unexpected results are different from each other, so its not as simple as nvim is not recognizing the local files and falling back on some default.

Can anyone explain this behavior? I'm struggling to get consistent colorschemes across different platforms and ran into this.

  • I would like to reproduce your problem but to be sure I have the correct understanding it would be helpful if you could you provide 1. the name of the colorscheme you test, 2. a screenshot with the Neovim colorscheme and 3. a screenshot with the locally copied colorscheme. Jan 16 at 4:08
  • 1
    I have tested using delek on Windows and I have the same result :-| Jan 16 at 5:40
  • Thank you for confirming this isn't just a me-problem, @VivianDeSmedt. I went to submit a github issue, and the question button linked here to stackexchange. So I guess my question at this point is this a bug or a known, expected behavior for some reason?
    – drootang
    Jan 17 at 13:09
  • I'm afraid we miss-understood each other. When I save I have the same result I mean I can't reproduce your problem both colorization gives the same result. Until we can't reproduce it I doubt anybody can determine if it is bug or a configuration mistake. But also I doubt anybody will be able to solve it. So I suppose you'll have to help Neovim people to reproduce your problem. If I can help I'll do my best with your help :-) Jan 17 at 13:29
  • Ah, thanks for clarifying. I'll see if I can reproduce in a cleaner environment and/or on windows.
    – drootang
    Jan 18 at 14:21


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.