Dracula not working
rojosinalma opened this issue · 4 comments
What happened
Followed the instructions in the website and vim throws errors at start.
Error detected while processing /media/sdd1/someone/.vimrc:
line 10:
E919: Directory not found in 'packpath': "pack/*/opt/dracula"
Error detected while processing /media/sdd1/someone/.vim/pack/themes/start/dracula/colors/dracula.vim:
line 34:
E121: Undefined variable: g:dracula#palette
E15: Invalid expression: g:dracula#palette.fg
line 36:
E121: Undefined variable: g:dracula#palette
E15: Invalid expression: g:dracula#palette.bglighter
line 37:
E121: Undefined variable: g:dracula#palette
E15: Invalid expression: g:dracula#palette.bglight
line 38:
E121: Undefined variable: g:dracula#palette
E15: Invalid expression: g:dracula#palette.bg
line 39:
E121: Undefined variable: g:dracula#palette
E15: Invalid expression: g:dracula#palette.bgdark
line 40:
E121: Undefined variable: g:dracula#palette
E15: Invalid expression: g:dracula#palette.bgdarker
line 42:
E121: Undefined variable: g:dracula#palette
E15: Invalid expression: g:dracula#palette.comment
line 43:
E121: Undefined variable: g:dracula#palette
E15: Invalid expression: g:dracula#palette.selection
line 44:
E121: Undefined variable: g:dracula#palette
E15: Invalid expression: g:dracula#palette.subtle
line 46:
E121: Undefined variable: g:dracula#palette
E15: Invalid expression: g:dracula#palette.cyan
line 47:
E121: Undefined variable: g:dracula#palette
E15: Invalid expression: g:dracula#palette.green
line 48:
E121: Undefined variable: g:dracula#palette
E15: Invalid expression: g:dracula#palette.orange
line 49:
E121: Undefined variable: g:dracula#palette
E15: Invalid expression: g:dracula#palette.pink
line 50:
E121: Undefined variable: g:dracula#palette
E15: Invalid expression: g:dracula#palette.purple
line 51:
E121: Undefined variable: g:dracula#palette
E15: Invalid expression: g:dracula#palette.red
line 52:
E121: Undefined variable: g:dracula#palette
E15: Invalid expression: g:dracula#palette.yellow
line 149:
E121: Undefined variable: s:bglight
E116: Invalid arguments for function <SNR>8_h
line 150:
E121: Undefined variable: s:bglighter
E116: Invalid arguments for function <SNR>8_h
line 151:
E121: Undefined variable: s:bgdark
E116: Invalid arguments for function <SNR>8_h
line 152:
E121: Undefined variable: s:bgdarker
E116: Invalid arguments for function <SNR>8_h
line 154:
E121: Undefined variable: s:fg
E116: Invalid arguments for function <SNR>8_h
line 155:
E121: Undefined variable: s:fg
E116: Invalid arguments for function <SNR>8_h
line 156:
E121: Undefined variable: s:fg
E116: Invalid arguments for function <SNR>8_h
line 158:
E121: Undefined variable: s:comment
E116: Invalid arguments for function <SNR>8_h
line 159:
E121: Undefined variable: s:comment
E116: Invalid arguments for function <SNR>8_h
line 161:
E121: Undefined variable: s:selection
E116: Invalid arguments for function <SNR>8_h
line 163:
E121: Undefined variable: s:subtle
E116: Invalid arguments for function <SNR>8_h
line 165:
E121: Undefined variable: s:cyan
E116: Invalid arguments for function <SNR>8_h
line 166:
E121: Undefined variable: s:cyan
E116: Invalid arguments for function <SNR>8_h
line 168:
E121: Undefined variable: s:green
E116: Invalid arguments for function <SNR>8_h
line 169:
E121: Undefined variable: s:green
E116: Invalid arguments for function <SNR>8_h
line 170:
E121: Undefined variable: s:green
E116: Invalid arguments for function <SNR>8_h
line 171:
E121: Undefined variable: s:green
E116: Invalid arguments for function <SNR>8_h
line 173:
E121: Undefined variable: s:orange
E116: Invalid arguments for function <SNR>8_h
line 174:
E121: Undefined variable: s:orange
E116: Invalid arguments for function <SNR>8_h
line 175:
E121: Undefined variable: s:orange
E116: Invalid arguments for function <SNR>8_h
line 176:
E121: Undefined variable: s:orange
E116: Invalid arguments for function <SNR>8_h
line 177:
E121: Undefined variable: s:bg
E116: Invalid arguments for function <SNR>8_h
line 179:
E121: Undefined variable: s:pink
E116: Invalid arguments for function <SNR>8_h
line 180:
E121: Undefined variable: s:pink
E116: Invalid arguments for function <SNR>8_h
line 182:
E121: Undefined variable: s:purple
E116: Invalid arguments for function <SNR>8_h
line 183:
E121: Undefined variable: s:purple
E116: Invalid arguments for function <SNR>8_h
line 184:
E121: Undefined variable: s:purple
E116: Invalid arguments for function <SNR>8_h
line 186:
E121: Undefined variable: s:red
E116: Invalid arguments for function <SNR>8_h
line 187:
E121: Undefined variable: s:fg
E116: Invalid arguments for function <SNR>8_h
line 189:
E121: Undefined variable: s:yellow
E116: Invalid arguments for function <SNR>8_h
line 190:
E121: Undefined variable: s:yellow
E116: Invalid arguments for function <SNR>8_h
line 192:
E121: Undefined variable: s:red
E116: Invalid arguments for function <SNR>8_h
line 194:
E121: Undefined variable: s:red
E116: Invalid arguments for function <SNR>8_h
line 195:
E121: Undefined variable: s:orange
E116: Invalid arguments for function <SNR>8_h
line 196:
E121: Undefined variable: s:cyan
E116: Invalid arguments for function <SNR>8_h
line 198:
E121: Undefined variable: s:cyan
E116: Invalid arguments for function <SNR>8_h
line 199:
E121: Undefined variable: s:green
E116: Invalid arguments for function <SNR>8_h
line 200:
E121: Undefined variable: s:comment
E116: Invalid arguments for function <SNR>8_h
line 201:
E121: Undefined variable: s:comment
E116: Invalid arguments for function <SNR>8_h
line 202:
E121: Undefined variable: s:cyan
E116: Invalid arguments for function <SNR>8_h
line 208:
E121: Undefined variable: s:orange
E116: Invalid arguments for function <SNR>8_h
line 212:
E121: Undefined variable: s:bg
E116: Invalid arguments for function <SNR>8_h
line 222:
E121: Undefined variable: s:fg
E116: Invalid arguments for function <SNR>8_h
line 223:
E121: Undefined variable: s:bglighter
E116: Invalid arguments for function <SNR>8_h
line 224:
E121: Undefined variable: s:bglight
E116: Invalid arguments for function <SNR>8_h
line 225:
E121: Undefined variable: s:bglighter
E116: Invalid arguments for function <SNR>8_h
line 226:
E121: Undefined variable: s:bglight
E116: Invalid arguments for function <SNR>8_h
line 227:
E121: Undefined variable: s:bg
E116: Invalid arguments for function <SNR>8_h
line 228:
E121: Undefined variable: s:subtle
E116: Invalid arguments for function <SNR>8_h
line 244:
E121: Undefined variable: s:comment
E116: Invalid arguments for function <SNR>8_h
line 253:
E121: Undefined variable: s:comment
E116: Invalid arguments for function <SNR>8_h
line 267:
E121: Undefined variable: s:green
E116: Invalid arguments for function <SNR>8_h
line 268:
E121: Undefined variable: s:cyan
E116: Invalid arguments for function <SNR>8_h
Press ENTER or type command to continue
This is my .vimrc
set termguicolors 2 set nocompatible
filetype on
set number
set cursorline
set tabstop=2
set hlsearch
set showmode
packadd! dracula
syntax on
colorscheme dracula
What I expected to happen
That it works 🤷
Machine Info
vim --version
vim --version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jan 10 2022 21:05:25)
Included patches: 1-197, 322, 377-378, 550, 649, 651, 703, 706-707, 881
Extra patches: 8.1.1401, 8.1.1382, 8.1.1368, 8.1.1367, 8.1.1366, 8.1.1365, 8.1.1046, 8.1.0613, 8.1.0547, 8.1.0546, 8.1.0544, 8.1.0540, 8.1.0539, 8.1.0538, 8.1.0506, 8.1.0208, 8.1.0206, 8.1.0205, 8.1.0189, 8.1.0177, 8.1.0067, 8.1.0066
Modified by pkg-vim-maintainers@lists.alioth.debian.org
Compiled by pkg-vim-maintainers@lists.alioth.debian.org
Huge version without GUI. Features included (+) or not (-):
+acl +file_in_path +mouse_sgr +tag_old_static
+arabic +find_in_path -mouse_sysmouse -tag_any_white
+autocmd +float +mouse_urxvt -tcl
-balloon_eval +folding +mouse_xterm +termguicolors
-browse -footer +multi_byte +terminfo
++builtin_terms +fork() +multi_lang +termresponse
+byte_offset +gettext -mzscheme +textobjects
+channel -hangul_input +netbeans_intg +timers
+cindent +iconv +num64 +title
-clientserver +insert_expand +packages -toolbar
-clipboard +job +path_extra +user_commands
+cmdline_compl +jumplist -perl +vertsplit
+cmdline_hist +keymap +persistent_undo +virtualedit
+cmdline_info +lambda +postscript +visual
+comments +langmap +printer +visualextra
+conceal +libcall +profile +viminfo
+cryptv +linebreak -python +vreplace
+cscope +lispindent -python3 +wildignore
+cursorbind +listcmds +quickfix +wildmenu
+cursorshape +localmap +reltime +windows
+dialog_con -lua +rightleft +writebackup
+diff +menu -ruby -X11
+digraphs +mksession +scrollbind -xfontset
-dnd +modify_fname +signs -xim
-ebcdic +mouse +smartindent -xpm
+emacs_tags -mouseshape +startuptime -xsmp
+eval +mouse_dec +statusline -xterm_clipboard
+ex_extra +mouse_gpm -sun_workshop -xterm_save
+extra_search -mouse_jsbterm +syntax
+farsi +mouse_netterm +tag_binary
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/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -Wdate-time -g -O2 -fdebug-prefix-map=/build/vim-narBpA/vim-8.0.0197=. -fstack-protector-strong -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim -lm -ltinfo -lnsl -lselinux -lacl -lattr -lgpm -ldl
Additional Info
If I try :colorscheme dracula
inside vim, it does work. It's just at launch that I get the error.
I'm aware that there was an older issue like this, I read it and tried everything there, but I believe Vims package system changed since then.
I also want to point out that draculas vim package does not have an opt
folder, so adding packadd! dracula
does nothing.
According to official docs:
To load an optional plugin from a pack use the `:packadd` command: >
:packadd foodebug
This searches for "pack/*/opt/foodebug" in 'packpath' and will find
~/.vim/pack/foo/opt/foodebug/plugin/debugger.vim and source it.
This could be done if some conditions are met. For example, depending on
whether Vim supports a feature or a dependency is missing.
You can also load an optional plugin at startup, by putting this command in
your |.vimrc|: >
:packadd! foodebug
The extra "!" is so that the plugin isn't loaded if Vim was started with
|--noplugin|.
It is perfectly normal for a package to only have files in the "opt"
directory. You then need to load each plugin when you want to use it.
You can also see the error in the third line of the error log I posted.
I just noticed that there's an instruction for my version of vim. It was completely lost on me.
I would maybe propose that this instruction is moved inside the codeblock for better visibility, but maybe it's just me.
Feel free to close the issue.
Could you share what instructions you missed and where? If there's something I can do to make docs clearer, that info will help.
At https://draculatheme.com/vim
The instruction that reads: If you use vim 8.0 (and not 8.2), you may need to use ~/.vim/pack/themes/opt or $HOME\vimfiles\pack\themes\opt instead.
I would just place it in the codeblock that comes before instead, to look something like this:
mkdir -p ~/.vim/pack/themes/opt # For vim 8.1
mkdir -p ~/.vim/pack/themes/start # For vim 8.2+
I can also write a PR if you think it'll help. In my case I just blew past it because usually I just focus on the codeblocks for quick solutions like this.
I'll take a look and make some changes to emphasize this more directly.