Giter VIP home page Giter VIP logo

Comments (12)

roxma avatar roxma commented on June 14, 2024

I can't reproduce it.

Could you reproduce this with

set NVIM_PYTHON_LOG_FILE=nvim.log
set NVIM_NCM_LOG_LEVEL=DEBUG
nvim test.js

and show the contents of the nvim.log_py3_cm_core and nvim.log_py3_cm_sources.cm_tern?

from nvim-completion-manager.

roxma avatar roxma commented on June 14, 2024

There's a possible cause of this issue, the <Plug>(cm_force_refresh) is triggered before the source channel started.

On my machine, all channels start within 3 seconds. It's hard to reproduce it in this case.

So I guess there may be other causes, which is why the log files are needed.

from nvim-completion-manager.

markonm avatar markonm commented on June 14, 2024

Issue is only related to gvim.
I tried it with minimal vimrc and couldn't reproduce the issue. Then I tried removing chunks of my vimrc and found out that

set guicursor=a:blinkon0          " disable blinking

is to blame. When I have it set I need to press <Plug>(cm_force_refresh) two times. Without it, it works as intended, even though it has small delay.

This is my minimal vimrc

call plug#begin()

Plug 'roxma/nvim-completion-manager'
if !has('nvim')
    Plug 'roxma/vim-hug-neovim-rpc'
endif
Plug 'roxma/nvim-cm-tern',  {'do': 'npm install'}

let g:cm_auto_popup = 0
imap <tab> <Plug>(cm_force_refresh)
set guicursor=a:blinkon0          " disable blinking

call plug#end()

Steps to reproduce:

  1. open blank buffer
  2. type fooooobaaaar
  3. type foooo
  4. type <tab>

I have to press tab 2 times to get completions.

nvim.log_py3_cm_core:
http://pastebin.com/Mb8fzSdz
nvim.log_py3_cm_sources.cm_tern:
http://pastebin.com/kBetxuTc

from nvim-completion-manager.

roxma avatar roxma commented on June 14, 2024

Thanks! I'll look into that.

from nvim-completion-manager.

roxma avatar roxma commented on June 14, 2024

It seems there's something wrong with vim's timer according to the log files, I switch to python implementation for the timer.

Update both plugin, NCM and ncm-tern, and check whether the issue is still happening.

If it's still happening, I'll still need the log files.

from nvim-completion-manager.

markonm avatar markonm commented on June 14, 2024

It's happening in a buffer without ft set also. Issue is not exclusively related to tern source. I updated plugins and it's still happening.
Log file:
nvim.log_py3_cm_core
http://pastebin.com/J57apttu

from nvim-completion-manager.

roxma avatar roxma commented on June 14, 2024

I get this reproduced.

The popup menu is displayed after seconds, or 10+ seconds. But according to the log file, the complete process is finished in 1 seond. I believe this is a vim issue.

I also noticed that if I touch <ctrl> after I press <Plug>(cm_force_refresh), the menu will be displayed.

from nvim-completion-manager.

roxma avatar roxma commented on June 14, 2024

Oh I got a workaround, just put this into your vimrc:

func g:Foo(...)
" do nothing
endfunc
call timer_start(100,function('g:Foo'),{'repeat':-1})

I guess this somehow activates vim's timer, and then the screen gets updated.

from nvim-completion-manager.

roxma avatar roxma commented on June 14, 2024

This may also be related to the ncm-tern slow issue you reported on roxma/nvim-cm-tern#2

from nvim-completion-manager.

markonm avatar markonm commented on June 14, 2024

Thank you! The workaround solves my issue.

As for tern issue, completions are still slow. I get buffer completions instantly and then after a second or two tern completions. I get the same delay with both automatic and manual completion.

from nvim-completion-manager.

markonm avatar markonm commented on June 14, 2024

I encountered similar issue in ALE and Neomake and I would like to report issue directly to Vim. But I struggle with producing minimal reproducible case. Is this issue connected with job_start function?

from nvim-completion-manager.

roxma avatar roxma commented on June 14, 2024

This issue is related to timer and vim's rpc somehow.

If there's no timer started, the display of popup menu get significantly delayed.

from nvim-completion-manager.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.