sainnhe / edge

Clean & Elegant Color Scheme inspired by Atom One and Material
MIT License
860 stars 56 forks source link

Error: Undefined variable: NAME E116: Invalid arguments for function edge#highlight #60

Closed zo718 closed 2 years ago

zo718 commented 2 years ago

Operating system/version

Mac OS Monterrey version 12.4 (21F79)

GUI client/version

VIM - Vi IMproved 8.2

Feature matrix

vim --version
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Jun 01 2022 14:23:13)
macOS version - x86_64
Included patches: 1-5050
Compiled by Homebrew
Huge version without GUI.  Features included (+) or not (-):
+acl               +file_in_path      +mouse_urxvt       -tag_any_white
+arabic            +find_in_path      +mouse_xterm       -tcl
+autocmd           +float             +multi_byte        +termguicolors
+autochdir         +folding           +multi_lang        +terminal
-autoservername    -footer            -mzscheme          +terminfo
-balloon_eval      +fork()            +netbeans_intg     +termresponse
+balloon_eval_term +gettext           +num64             +textobjects
-browse            -hangul_input      +packages          +textprop
++builtin_terms    +iconv             +path_extra        +timers
+byte_offset       +insert_expand     +perl              +title
+channel           +ipv6              +persistent_undo   -toolbar
+cindent           +job               +popupwin          +user_commands
-clientserver      +jumplist          +postscript        +vartabs
+clipboard         +keymap            +printer           +vertsplit
+cmdline_compl     +lambda            +profile           +vim9script
+cmdline_hist      +langmap           -python            +viminfo
+cmdline_info      +libcall           +python3           +virtualedit
+comments          +linebreak         +quickfix          +visual
+conceal           +lispindent        +reltime           +visualextra
+cryptv            +listcmds          +rightleft         +vreplace
+cscope            +localmap          +ruby              +wildignore
+cursorbind        +lua               +scrollbind        +wildmenu
+cursorshape       +menu              +signs             +windows
+dialog_con        +mksession         +smartindent       +writebackup
+diff              +modify_fname      -sodium            -X11
+digraphs          +mouse             -sound             -xfontset
-dnd               -mouseshape        +spell             -xim
-ebcdic            +mouse_dec         +startuptime       -xpm
+emacs_tags        -mouse_gpm         +statusline        -xsmp
+eval              -mouse_jsbterm     -sun_workshop      -xterm_clipboard
+ex_extra          +mouse_netterm     +syntax            -xterm_save
+extra_search      +mouse_sgr         +tag_binary
-farsi             -mouse_sysmouse    -tag_old_static
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/usr/local/share/vim"
Compilation: clang -c -I. -Iproto -DHAVE_CONFIG_H -DMACOS_X -DMACOS_X_DARWIN -g -O2 -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: clang -L. -fstack-protector-strong -L/usr/local/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/openssl@1.1/lib -L/usr/local/opt/readline/lib -L/usr/local/lib -o vim -lm -lncurses -liconv -lintl -framework AppKit -L/usr/local/opt/lua/lib -llua5.4 -mmacosx-version-min=12.0 -fstack-protector-strong -L/usr/local/lib -L/usr/local/Cellar/perl/5.34.0/lib/perl5/5.34.0/darwin-thread-multi-2level/CORE -lperl -L/usr/local/opt/python@3.10/Frameworks/Python.framework/Versions/3.10/lib/python3.10/config-3.10-darwin -lpython3.10 -framework CoreFoundation -lruby.3.1 -L/usr/local/Cellar/ruby/3.1.2/lib

Minimal vimrc that can reproduce this bug.

  1 set number
  2 syntax on
  3 set tabstop=4
  4 set expandtab
  5 "
  6 "search
  7 set incsearch
  8 set hlsearch
  9 ""folding
 10 set foldmethod=indent
 11 set foldnestmax=5
 12 set ruler laststatus=2 number title hlsearch
 13
 14 "vimcolors edge profile installed. ~/.vim/colors
 15 " for dark version
 16 set background=dark
 17 source ~/.vim/autoload/edge.vim
 18 colo edge
 19 if has('termguicolors')
 20 set termguicolors
 21 endif
 22 let g:edge_style = 'edge'
 23 let g:edge_better_performance = 1
 24 colorscheme edge
 25 let g:lightline.colorscheme = 'edge'

Steps to reproduce this bug using minimal vimrc

Whenever I try to use vim to open a file or create a new one, I get many undefined variable errors. The file will open afterward, and I can see the edge profile, but many errors have popped up before. See below:

[edge] Cleaned /Users/name/.vim/after/syntax Error detected while processing /Users/name/.vimrc[24]../Users/name/.vim/colors/edge.vim[11]..function edge#get_palette: line 91: E121: Undefined variable: palette E116: Invalid arguments for function extend(palette, palette_fg) "}}} line 121: E121: Undefined variable: palette E116: Invalid arguments for function extend(palette, a:colors_override) Error detected while processing /Users/name/.vimrc[24]../Users/name/.vim/colors/edge.vim: line 44: E121: Undefined variable: fg E116: Invalid arguments for function edge#highlight line 54: E121: Undefined variable: fg E116: Invalid arguments for function edge#highlight line 55: E121: Undefined variable: grey_dim E116: Invalid arguments for function edge#highlight line 56: E121: Undefined variable: bg0 E116: Invalid arguments for function edge#highlight line 57: E121: Undefined variable: bg0 E116: Invalid arguments for function edge#highlight line 58: E121: Undefined variable: none E116: Invalid arguments for function edge#highlight line 59: E121: Undefined variable: grey_dim E116: Invalid arguments for function edge#highlight line 61: E121: Undefined variable: none E116: Invalid arguments for function edge#highlight line 73: E121: Undefined variable: none E116: Invalid arguments for function edge#highlight line 76: E121: Undefined variable: grey_dim E116: Invalid arguments for function edge#highlight line 80: E121: Undefined variable: grey E116: Invalid arguments for function edge#highlight line 82: E121: Undefined variable: none E116: Invalid arguments for function edge#highlight line 83: E121: Undefined variable: none E116: Invalid arguments for function edge#highlight line 84: E121: Undefined variable: none E116: Invalid arguments for function edge#highlight line 85: E121: Undefined variable: bg0 E116: Invalid arguments for function edge#highlight line 86: E121: Undefined variable: green E116: Invalid arguments for function edge#highlight line 87: E121: Undefined variable: red E116: Invalid arguments for function edge#highlight line 88: E121: Undefined variable: yellow E116: Invalid arguments for function edge#highlight line 89: E121: Undefined variable: fg E116: Invalid arguments for function edge#highlight line 90: E121: Undefined variable: blue E116: Invalid arguments for function edge#highlight line 91: E121: Undefined variable: none E116: Invalid arguments for function edge#highlight line 92: E121: Undefined variable: bg4 E116: Invalid arguments for function edge#highlight line 93: E121: Undefined variable: bg4 E116: Invalid arguments for function edge#highlight line 94: E121: Undefined variable: bg4 E116: Invalid arguments for function edge#highlight line 95: E121: Undefined variable: fg E116: Invalid arguments for function edge#highlight line 96: E121: Undefined variable: none E116: Invalid arguments for function edge#highlight line 98: E121: Undefined variable: bg0 E116: Invalid arguments for function edge#highlight line 105: E121: Undefined variable: none E116: Invalid arguments for function edge#highlight line 106: E121: Undefined variable: fg E116: Invalid arguments for function edge#highlight line 107: E121: Undefined variable: grey E116: Invalid arguments for function edge#highlight line 108: E121: Undefined variable: yellow E116: Invalid arguments for function edge#highlight line 110: E121: Undefined variable: none E116: Invalid arguments for function edge#highlight line 129: E121: Undefined variable: fg E116: Invalid arguments for function edge#highlight line 137: E121: Undefined variable: black E116: Invalid arguments for function edge#highlight line 138: E121: Undefined variable: none E116: Invalid arguments for function edge#highlight line 139: E121: Undefined variable: none E116: Invalid arguments for function edge#highlight line 140: E121: Undefined variable: purple E116: Invalid arguments for function edge#highlight line 141: E121: Undefined variable: yellow E116: Invalid arguments for function edge#highlight line 142: E121: Undefined variable: bg0 E116: Invalid arguments for function edge#highlight line 143: E121: Undefined variable: bg0 E116: Invalid arguments for function edge#highlight line 144: E121: Undefined variable: bg0 E116: Invalid arguments for function edge#highlight line 208: E121: Undefined variable: red E116: Invalid arguments for function edge#highlight line 214: E121: Undefined variable: purple E116: Invalid arguments for function edge#highlight line 215: E121: Undefined variable: purple E116: Invalid arguments for function edge#highlight line 216: E121: Undefined variable: purple E116: Invalid arguments for function edge#highlight line 217: E121: Undefined variable: purple E116: Invalid arguments for function edge#highlight line 218: E121: Undefined variable: purple E116: Invalid arguments for function edge#highlight line 219: E121: Undefined variable: purple E116: Invalid arguments for function edge#highlight line 220: E121: Undefined variable: purple E116: Invalid arguments for function edge#highlight line 221: E121: Undefined variable: purple E116: Invalid arguments for function edge#highlight line 222: E121: Undefined variable: purple E116: Invalid arguments for function edge#highlight line 223: E121: Undefined variable: purple E116: Invalid arguments for function edge#highlight line 224: E121: Undefined variable: yellow E116: Invalid arguments for function edge#highlight line 225: E121: Undefined variable: red E116: Invalid arguments for function edge#highlight line 226: E121: Undefined variable: yellow E116: Invalid arguments for function edge#highlight line 227: E121: Undefined variable: yellow E116: Invalid arguments for function edge#highlight line 228: E121: Undefined variable: yellow E116: Invalid arguments for function edge#highlight line 229: E121: Undefined variable: green E116: Invalid arguments for function edge#highlight line 230: E121: Undefined variable: green E116: Invalid arguments for function edge#highlight line 231: E121: Undefined variable: green E116: Invalid arguments for function edge#highlight line 232: E121: Undefined variable: green E116: Invalid arguments for function edge#highlight line 233: E121: Undefined variable: green E116: Invalid arguments for function edge#highlight line 234: E121: Undefined variable: blue E116: Invalid arguments for function edge#highlight line 235: E121: Undefined variable: purple E116: Invalid arguments for function edge#highlight line 236: E121: Undefined variable: purple E116: Invalid arguments for function edge#highlight line 237: E121: Undefined variable: yellow E116: Invalid arguments for function edge#highlight line 238: E121: Undefined variable: fg E116: Invalid arguments for function edge#highlight line 244: E121: Undefined variable: grey E116: Invalid arguments for function edge#highlight line 248: E121: Undefined variable: grey E116: Invalid arguments for function edge#highlight line 249: E121: Undefined variable: none E116: Invalid arguments for function edge#highlight line 252: E121: Undefined variable: fg E116: Invalid arguments for function edge#highlight line 253: E121: Undefined variable: grey E116: Invalid arguments for function edge#highlight line 254: E121: Undefined variable: red E116: Invalid arguments for function edge#highlight line 255: E121: Undefined variable: yellow E116: Invalid arguments for function edge#highlight line 256: E121: Undefined variable: green E116: Invalid arguments for function edge#highlight line 257: E121: Undefined variable: cyan E116: Invalid arguments for function edge#highlight line 258: E121: Undefined variable: blue E116: Invalid arguments for function edge#highlight line 259: E121: Undefined variable: purple E116: Invalid arguments for function edge#highlight line 268: E121: Undefined variable: red E116: Invalid arguments for function edge#highlight line 275: E121: Undefined variable: red E116: Invalid arguments for function edge#highlight line 276: E121: Undefined variable: yellow E116: Invalid arguments for function edge#highlight line 277: E121: Undefined variable: green E116: Invalid arguments for function edge#highlight line 278: E121: Undefined variable: cyan E116: Invalid arguments for function edge#highlight line 279: E121: Undefined variable: blue E116: Invalid arguments for function edge#highlight line 280: E121: Undefined variable: purple E116: Invalid arguments for function edge#highlight line 287: E121: Undefined variable: none E116: Invalid arguments for function edge#highlight line 314: E121: Undefined variable: red E116: Invalid arguments for function edge#highlight line 315: E121: Undefined variable: yellow E116: Invalid arguments for function edge#highlight line 316: E121: Undefined variable: blue E116: Invalid arguments for function edge#highlight line 317: E121: Undefined variable: green E116: Invalid arguments for function edge#highlight line 321: E121: Undefined variable: none E116: Invalid arguments for function edge#highlight line 330: E121: Undefined variable: bg0 line 368: E121: Undefined variable: none E116: Invalid arguments for function edge#highlight line 369: E121: Undefined variable: none E116: Invalid arguments for function edge#highlight line 370: E121: Undefined variable: none E116: Invalid arguments for function edge#highlight line 371: E121: Undefined variable: bg0 E116: Invalid arguments for function edge#highlight line 372: E121: Undefined variable: bg0 E116: Invalid arguments for function edge#highlight line 373: E121: Undefined variable: bg0 E116: Invalid arguments for function edge#highlight line 425: E121: Undefined variable: none E116: Invalid arguments for function edge#highlight line 426: E121: Undefined variable: green E116: Invalid arguments for function edge#highlight line 539: E121: Undefined variable: green E116: Invalid arguments for function edge#highlight line 540: E121: Undefined variable: green E116: Invalid arguments for function edge#highlight line 541: E121: Undefined variable: blue E116: Invalid arguments for function edge#highlight line 542: E121: Undefined variable: purple E116: Invalid arguments for function edge#highlight line 543: E121: Undefined variable: red E116: Invalid arguments for function edge#highlight line 544: E121: Undefined variable: yellow E116: Invalid arguments for function edge#highlight line 545: E121: Undefined variable: cyan E116: Invalid arguments for function edge#highlight line 546: E121: Undefined variable: bg0 E116: Invalid arguments for function edge#highlight line 547: E121: Undefined variable: bg0 E116: Invalid arguments for function edge#highlight line 548: E121: Undefined variable: fg E116: Invalid arguments for function edge#highlight line 549: E121: Undefined variable: fg E116: Invalid arguments for function edge#highlight line 550: E121: Undefined variable: fg E116: Invalid arguments for function edge#highlight line 551: E121: Undefined variable: fg E116: Invalid arguments for function edge#highlight line 552: E121: Undefined variable: fg E116: Invalid arguments for function edge#highlight line 553: E121: Undefined variable: purple E116: Invalid arguments for function edge#highlight line 554: E121: Undefined variable: bg0 E116: Invalid arguments for function edge#highlight line 555: E121: Undefined variable: bg0 E116: Invalid arguments for function edge#highlight line 568: E121: Undefined variable: red E116: Invalid arguments for function edge#highlight line 569: E121: Undefined variable: none E116: Invalid arguments for function edge#highlight line 570: E121: Undefined variable: purple E116: Invalid arguments for function edge#highlight line 571: E121: Undefined variable: fg E116: Invalid arguments for function edge#highlight line 572: E121: Undefined variable: fg E116: Invalid arguments for function edge#highlight line 573: E121: Undefined variable: red E116: Invalid arguments for function edge#highlight line 574: E121: Undefined variable: yellow E116: Invalid arguments for function edge#highlight line 575: E121: Undefined variable: cyan E116: Invalid arguments for function edge#highlight line 576: E121: Undefined variable: blue E116: Invalid arguments for function edge#highlight line 577: E121: Undefined variable: purple E116: Invalid arguments for function edge#highlight line 578: E121: Undefined variable: green E116: Invalid arguments for function edge#highlight line 579: E121: Undefined variable: red E116: Invalid arguments for function edge#highlight line 619: E121: Undefined variable: green E116: Invalid arguments for function edge#highlight line 620: E121: Undefined variable: green E116: Invalid arguments for function edge#highlight line 621: E121: Undefined variable: green E116: Invalid arguments for function edge#highlight line 622: E121: Undefined variable: purple E116: Invalid arguments for function edge#highlight line 623: E121: Undefined variable: fg E116: Invalid arguments for function edge#highlight line 627: E121: Undefined variable: green E116: Invalid arguments for function edge#highlight line 628: E121: Undefined variable: grey E116: Invalid arguments for function edge#highlight line 629: E121: Undefined variable: grey E116: Invalid arguments for function edge#highlight line 630: E121: Undefined variable: blue E116: Invalid arguments for function edge#highlight line 631: E121: Undefined variable: bg1 E116: Invalid arguments for function edge#highlight line 632: E121: Undefined variable: grey E116: Invalid arguments for function edge#highlight line 661: E121: Undefined variable: none E116: Invalid arguments for function edge#highlight line 662: E121: Undefined variable: none E116: Invalid arguments for function edge#highlight line 663: E121: Undefined variable: none E116: Invalid arguments for function edge#highlight line 670: E121: Undefined variable: bg_purple E116: Invalid arguments for function edge#highlight line 683: E121: Undefined variable: blue E116: Invalid arguments for function edge#highlight line 700: E121: Undefined variable: grey_dim line 701: E121: Undefined variable: grey_dim line 737: E121: Undefined variable: grey_dim line 738: E121: Undefined variable: grey_dim line 741: E121: Undefined variable: green E116: Invalid arguments for function edge#highlight line 742: E121: Undefined variable: blue E116: Invalid arguments for function edge#highlight [edge] Generated /Users/name/.vim/after/syntax Error detected while processing /Users/name/.vimrc: line 25: E121: Undefined variable: g:lightline Press ENTER or type command to continue

Expected behavior

Open or create any file using vim with the edge profile without errors.

Actual behavior

When opening or creating any file using vim and the edge profile. Many errors appear like the one below before I can start using vim.

Undefined variable: grey
E116: Invalid arguments for function edge#highlight
sainnhe commented 2 years ago

Sorry for late reply, could you the following steps:

  1. Update this theme to the newest version.
  2. Delete after/plugin if it exists.
  3. Delete after/syntax.
  4. Reopen a file, after/syntax directory will be regenerated.
zo718 commented 2 years ago

Thank you for the instructions. Unfortunately, the issue still happens. I deleted everything in my .vim directory and cloned this repo again. I set up all the folders manually copy & paste them, just like in the docs.txt same errors.

sainnhe commented 2 years ago
let g:edge_style = 'edge'

'edge' is not an available value for g:edge_style.

https://github.com/sainnhe/edge/blob/33dbe6b7ac23f8666d36ad27db7f82ff58cb2408/doc/edge.txt#L196-L206


There is a typo in help doc, should be fixed via https://github.com/sainnhe/edge/commit/33dbe6b7ac23f8666d36ad27db7f82ff58cb2408