voldikss / coc-browser

See https://github.com/voldikss/coc-extensions
127 stars 6 forks source link

Doesn't seem to work with vim8 #6

Closed kantord closed 4 years ago

kantord commented 4 years ago

Has this been tested using vim8? I tried with both Firefox and Chrome, and haven't managed to set it up.

To reproduce, follow the instructions, but with vim8 instead of neovim

voldikss commented 4 years ago

image

Hi @kantord It's strange...I just tested on my PC and it works on vim8.

VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Aug 20 2020 22:02:30)
kantord commented 4 years ago

Is there a way to debug it? Seeing some debug messages or such?

voldikss commented 4 years ago

Actually it uses a pretty simple way to do completion.

  1. Browser extension sends words to the local server
  2. Local server receives the data and stores them in the files
  3. Coc.nvim get completion candidates by reading those files.

The files containing words are normally located in C:\Users\xxx\AppData\Local\coc\extensions\coc-browser-data. So you can check if the files exists.

I haven't implemented any debug feature for the extension. I'll try to implement that when I have free time.

kantord commented 4 years ago

I am on Arch Linux, where would the files be located in that case?

kantord commented 4 years ago

I have this folder ~/.config/coc/extensions/coc-browser-data but it's empty

voldikss commented 4 years ago

Hmm seems the local server hasn't received the words.

Daniel Kantor notifications@github.com 于 2020年9月8日周二 下午6:58写道:

I have this folder ~/.config/coc/extensions/coc-browser-data but it's empty

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/voldikss/coc-browser/issues/6#issuecomment-688791880, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE2X3K6PKATJ2R5T2XE2HSDSEYE6XANCNFSM4Q7XNPYQ .

voldikss commented 4 years ago

Does this extension work on nvim?

Ꮩ0ᏞᎠIᏦSS dyzplus@gmail.com 于 2020年9月8日周二 下午7:02写道:

Hmm seems the local server hasn't received the words.

Daniel Kantor notifications@github.com 于 2020年9月8日周二 下午6:58写道:

I have this folder ~/.config/coc/extensions/coc-browser-data but it's empty

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/voldikss/coc-browser/issues/6#issuecomment-688791880, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE2X3K6PKATJ2R5T2XE2HSDSEYE6XANCNFSM4Q7XNPYQ .

kantord commented 4 years ago

Sorry, I didn't have time to try it in nvim yet.

After a quick look at the source code for the browser plugin: is this meant to work with multiple open vim instances at the same time? Is it possible that it only worked in one specific vim instance?

kantord commented 4 years ago

I realized that it works in one of my vim instances, but not in any further instance

voldikss commented 4 years ago

I forget how I designed it's multiple instance mode before. But I just tested it. and the result is (I used neovim to do the test),

It works with every nvim instance I've opened.

kantord commented 4 years ago

It's conflicting with another server running on 8888.