maralla / completor.vim

Async completion framework made ease.
MIT License
1.32k stars 62 forks source link

vars_wrapper object is not subscriptable #183

Closed ipod825 closed 6 years ago

ipod825 commented 6 years ago

I am using vim-netranger in neovim and found that completor is incompatible with it. See the end of this post on how to reproduce the issue. The error message from vim-netranger is: 'vars_wrapper' object is not subscriptable, where vim-netranger tried to execute this line: vim.vars[name] After tracing completor.vim's code, I found this line modified the vim python module internal, which seems very dangerous to me. As other plugin could use the vim module in the way completor might not expect.

Anyway, I don't know how to fix this on completor, but I think this should be redesigned to prevent potential bugs like this one.

Step to produce the issue:

  1. Install both completor.vim and vim-netranger
  2. mkdir tmp
    cd tmp
    echo a > a.txt
    nvim .
  3. Inside vim-netranger, press l to open a.txt. Insert a space before a. Then run :x