bluz71 / vim-nightfly-colors

A dark midnight theme for modern Neovim & classic Vim
MIT License
828 stars 51 forks source link

E684: list index out of range: 0 #5

Closed chrissound closed 4 years ago

chrissound commented 4 years ago

Thanks for making this! I did run into this error though.

Error detected while processing /home/chris/.config/nvim/plugged/vim-nightfly-guicolors/colors/nightfly.vim:
line   20:
E684: list index out of range: 0
E15: Invalid expression: nvim_list_uis()[0]['ext_termcolors'] && !&termguicolors
bluz71 commented 4 years ago

Can you provide details about your Neovim client and version.

If I was to guess I suspect you may be running an older version of Neovim. To-be-confirmed.

Neovim 0.4.3 works fine for me, for reference.

Ultimately this should be fixed. I just need details to repeat it. Thanks.

chrissound commented 4 years ago
NVIM v0.3.8
Build type: Release
LuaJIT 2.1.0-beta3
Compilation: 
Compiled by nixbld

Features: +acl +iconv +jemalloc +tui 
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "
/nix/store/g4g7h0gj5fxygvdyb550rm49s8qrb07x-neovim-unwrapped-0.3.8/share/nvim"

Run :checkhealth for more info
bluz71 commented 4 years ago

This issue is now fixed in that latest commit, please update and try again.

It seems the ext_termcolors attribute is only set for Neovim client 0.4 and later. For older Neovim clients I no longer do the termguicolors test; however it should be pretty obvious that something is wrong if a user doesn't set it (for terminal-based Neovim).

chrissound commented 4 years ago

Thank you! Works great :)