0

I'm on pop!_os and I'm trying to get Tokyonight to work with Neovim, but I recieve the following error when I start Neovim:

Error detected while processing /home/username/.config/nvim/init.vim:
line    1:
E185: Cannot find color scheme 'tokyonight'

I've installed the lastest version of Neovim (0.5.0) and I am using vim-plug to manage plugins. My config path looks like the following

~/.config/nvim/
autoload/ init.vim vim-plug/

I've added the following to my init.vim as stated in the Tokyonight github and vim-plug docs

colorscheme tokyonight
source $HOME/.config/nvim/vim-plug/plugins.vim

I've successfully added the Tokyonight to my ./vim-plug/plugins.vim file and installed the plugin using vim-plug in neovim, but I still receive this error and I'm honestly lost as to why this is happening.

2
  • Find colors/tokyonight.vim in your local vim dir then make sure the parent of that colors directory is found in the paths stored in :set rtp? That's the first thing I'd check. – B Layer May 24 at 5:42
  • looks like it's there. :set rtp shows that ~/.config/nvim/autoload/plugged/tokyonight.nvim is in the run time path which holds ./colors/tokyonight.vim – 8bit May 24 at 6:07
1

The error I made is placing the colorscheme command before the source command. init.vim should look like the following:

source $HOME/.config/nvim/vim-plug/plugins.vim
colorscheme tokyonight
1
  • I actually noticed that but got distracted before I could comment. Glad you found it. – B Layer May 24 at 7:39

Not the answer you're looking for? Browse other questions tagged or ask your own question.