Idk if you can reproduce, but whenever I call ":LeetCodeList" for the
first time, what happens is:
the autoload loads the lettcode.vim from the autoload folder
the leetcode#ListProblems creates a new buffer;
because the buffer is of no type (i might be saying dumb things here..)
the autoload attempts to load the function again, which it fails to
do because the function is in the middle of the rest call;
nvim displays a message
Signed in. Error detected while processing /Users/atuzhikov/.vim/plugged/leetcode.vim/autoload/leetcode.vim: line 425: E127: Cannot redefine function leetcode#ListProblems: It is in use
which is ok, but fairly annoying.
The proposed change is to check whether the list buffer has already been
loaded, and if yes - no need to redefine the functions.
Thank you for considering the pr, and once again - thank you for the plugin,
it saves me from a lot of going back and forth to the web page;
Hi ianding1!
Idk if you can reproduce, but whenever I call ":LeetCodeList" for the first time, what happens is:
Signed in. Error detected while processing /Users/atuzhikov/.vim/plugged/leetcode.vim/autoload/leetcode.vim: line 425: E127: Cannot redefine function leetcode#ListProblems: It is in use
which is ok, but fairly annoying.The proposed change is to check whether the list buffer has already been loaded, and if yes - no need to redefine the functions.
Thank you for considering the pr, and once again - thank you for the plugin, it saves me from a lot of going back and forth to the web page;
Cheers!