Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vim 8 support #1

Open
braun-steven opened this issue Nov 6, 2019 · 4 comments
Open

Vim 8 support #1

braun-steven opened this issue Nov 6, 2019 · 4 comments

Comments

@braun-steven
Copy link
Contributor

braun-steven commented Nov 6, 2019

Hey David, thanks for working on this plugin!

After logging into overleaf and opening a project and running :call Airlatex(), the sidebar pops up and :messages is populated with the following error:

Error detected while processing function AirLatex_project_update:
line    2:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/tak/.vim/plugged/AirLatex.vim/python/sidebar.py", line 459, in <module> sidebar.triggerRefresh()
  File "/home/tak/.vim/plugged/AirLatex.vim/python/sidebar.py", line 46, in triggerRefresh vim.async_call(refresh)
AttributeError: module 'vim' has no attribute 'async_call'

This error continues to pop up when I want to navigate in the AirLatex sidebar. No connection can be established.

Here is the output of vim --version if it helps you:

VIM - Vi IMproved 8.1 (2018 May 18, compiled Sep 29 2019 22:27:49)
Included patches: 1-2102
Compiled by Arch Linux
Huge version without GUI.  Features included (+) or not (-):
+acl               -farsi             -mouse_sysmouse    -tag_any_white
+arabic            +file_in_path      +mouse_urxvt       +tcl/dyn
+autocmd           +find_in_path      +mouse_xterm       +termguicolors
+autochdir         +float             +multi_byte        +terminal
-autoservername    +folding           +multi_lang        +terminfo
-balloon_eval      -footer            -mzscheme          +termresponse
+balloon_eval_term +fork()            +netbeans_intg     +textobjects
-browse            +gettext           +num64             +textprop
++builtin_terms    -hangul_input      +packages          +timers
+byte_offset       +iconv             +path_extra        +title
+channel           +insert_expand     +perl/dyn          -toolbar
+cindent           +job               +persistent_undo   +user_commands
-clientserver      +jumplist          +postscript        +vartabs
-clipboard         +keymap            +printer           +vertsplit
+cmdline_compl     +lambda            +profile           +virtualedit
+cmdline_hist      +langmap           +python/dyn        +visual
+cmdline_info      +libcall           +python3/dyn       +visualextra
+comments          +linebreak         +quickfix          +viminfo
+conceal           +lispindent        +reltime           +vreplace
+cryptv            +listcmds          +rightleft         +wildignore
+cscope            +localmap          +ruby/dyn          +wildmenu
+cursorbind        +lua/dyn           +scrollbind        +windows
+cursorshape       +menu              +signs             +writebackup
+dialog_con        +mksession         +smartindent       -X11
+diff              +modify_fname      -sound             -xfontset
+digraphs          +mouse             +spell             -xim
-dnd               -mouseshape        +startuptime       -xpm
-ebcdic            +mouse_dec         +statusline        -xsmp
+emacs_tags        +mouse_gpm         -sun_workshop      -xterm_clipboard
+eval              -mouse_jsbterm     +syntax            -xterm_save
+ex_extra          +mouse_netterm     +tag_binary        
+extra_search      +mouse_sgr         -tag_old_static    
   system vimrc file: "/etc/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   -D_FORTIFY_SOURCE=2  -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1       
Linking: gcc   -L. -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.30/core_perl/CORE  -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -L/usr/local/lib -Wl,--as-needed -o vim        -lm -ltinfo -lelf -lnsl    -lacl -lattr -lgpm -ldl   -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.30/core_perl/CORE -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -fstack-protector-strong -L/usr/local/lib  -L/usr/lib/perl5/5.30/core_perl/CORE -lperl -lpthread -ldl -lm -lcrypt -lutil -lc   -L/usr/lib -ltclstub8.6 -ldl -lz -lpthread -lm

Let me know if I can provide more information.

Additional information:

  • Firefox Version: 70.0.1
  • OS: Arch Linux (Kernel 5.3.7, Zen)
  • Minimal .vimrc:
call plug#begin('~/.vim/plugged')
  Plug 'da-h/AirLatex.vim'
call plug#end()
let g:airlatex_domain="www.overleaf.com"

Edit: Adjusted the airlatex_domain to Overleaf and it now works in NeoVim.

@braun-steven braun-steven changed the title Multiple Issue Multiple Issues Nov 6, 2019
@braun-steven braun-steven changed the title Multiple Issues Cannot establish connection Nov 6, 2019
@sbrodehl
Copy link
Contributor

sbrodehl commented Nov 6, 2019

Hi Steven!

Looks like the default domain is indeed a little bit outdated, I issued a PR (#3) to solve that.

@da-h
Copy link
Owner

da-h commented Nov 6, 2019

Hey @Steven-LANG,

thanks for this issue & your suggestions!

Unfortunately, vim.async_call is indeed neovim only. However, I am currently working on a synchronized GUI handler that should also work with vim. (I will merge that branch in the next 3-5 days).

Best
da-h

PS: I just found a bug related to pushing changes to the server. Now, the plugin is not yet useable in the direction vim -> overleaf-server.

@braun-steven
Copy link
Contributor Author

Ah good to know. Since 8.0, Vim supports async jobs as well, but the API for that seems to be more complicated, see channels.

@da-h
Copy link
Owner

da-h commented Nov 6, 2019

Thanks for the reference!

BTW: as of 8a6d06f everything should work right now. ;)

@da-h da-h changed the title Cannot establish connection Vim 8 support Nov 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants