tpope / vim-surround

surround.vim: Delete/change/add parentheses/quotes/XML-tags/much more with ease

Home Page:https://www.vim.org/scripts/script.php?script_id=1697

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

After installation vim shows error "/.vim/plugged/surround.nvim/lua/surround/utils.lua:324: attempt to index a nil value (field 'api')"

denisoby opened this issue · comments

Hi guys

Can you please help me installing your wonderful plugin?

I've modified my ./.vimrc in the following way

call plug#begin()
Plug 'blackcauldron7/surround.nvim'
.... other code...
call plug#end()

Inside of the vim I see, that :PlugInstall works correctly and I get surround.nvim: Already installed

But when I add lua setup call to .vimrc like this

call plug#begin()
Plug 'blackcauldron7/surround.nvim'
.... other code...
call plug#end()

lua require"surround".setup{}

I get an error on vim start

Error detected while processing /Users/your_user/.vimrc:
line   60:
...r_user/.vim/plugged/surround.nvim/lua/surround/utils.lua:324: attempt to index a nil value (field 'api')

I'm using vim / neovim as a main code editor for a year+ and fell it extremely comfortable.
But I'm completely new to vim configuration with lua and vim-plug, so would really appreciate if you help to fix this issue.

Here is my vim --version (mac os catalina 10.15.7)

vim --version
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Jan 24 2022 11:40:37)
macOS version - x86_64
Included patches: 1-4200
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: "/Users/your_user/homebrew/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/Users/your_user/homebrew/lib -L/Users/your_user/homebrew/opt/libyaml/lib -L/Users/your_user/homebrew/opt/openssl@1.1/lib -L/Users/your_user/homebrew/opt/readline/lib -L/usr/local/lib -o vim -lncurses -liconv -lintl -framework AppKit -L/Users/your_user/homebrew/opt/lua/lib -llua5.4 -mmacosx-version-min=10.15 -fstack-protector-strong -L/usr/local/lib -L/opt/local/lib -L/Users/your_user/homebrew/Cellar/perl/5.34.0/lib/perl5/5.34.0/darwin-thread-multi-2level/CORE -lperl -lm -lutil -lc -L/Users/your_user/homebrew/opt/python@3.10/Frameworks/Python.framework/Versions/3.10/lib/python3.10/config-3.10-darwin -lpython3.10 -lintl -framework CoreFoundation -lruby.3.0 -L/Users/your_user/homebrew/Cellar/ruby/3.0.3/lib 

Thank you!

Wrong project.

Omg, sorry :)