Code Monkey home page Code Monkey logo

Comments (6)

fannheyward avatar fannheyward commented on June 3, 2024

any global argument can be added to disable this auto command

No such configuration and there's no plan to add this. coc.nvim needs CursorMoved to refresh diagnostic/highlight/codeLens etc.

I'm using coc.nvim with lualine, didn't find any noticeable slowdown, what's your nvim version?

from coc.nvim.

TaylorTrz avatar TaylorTrz commented on June 3, 2024

any global argument can be added to disable this auto command

No such configuration and there's no plan to add this. coc.nvim needs CursorMoved to refresh diagnostic/highlight/codeLens etc.

I'm using coc.nvim with lualine, didn't find any noticeable slowdown, what's your nvim version?

Version info:

$ nvim --version
NVIM v0.9.5
Build type: Release
LuaJIT 2.1.1692716794

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/local/share/nvim"

Run :checkhealth for more info

Can you show me your test result to execute this vim script?

function! s:localtime_milli()
    let s:lt = reltime()
    return s:lt[0] * 1000 + s:lt[1] / 1000
endfunction

function! s:Autocmd(...) abort
  if !get(g:, 'coc_workspace_initialized', 0)
    return
  endif
  call coc#rpc#notify('CocAutocmd', a:000)
endfunction

" -------------------------------------------------------------------------------------------------
for x in range(1000)
    let s:start = s:localtime_milli()

    call s:Autocmd('CursorMoved', +expand('<abuf>'), [line('.'), col('.')])

    let s:elapsed = s:localtime_milli() -  s:start
    echomsg s:elapsed
endfor
" -------------------------------------------------------------------------------------------------

from coc.nvim.

fannheyward avatar fannheyward commented on June 3, 2024

Similar with your result:

image

from coc.nvim.

TaylorTrz avatar TaylorTrz commented on June 3, 2024

Similar with your result:

image

Thanks for you reply.

from coc.nvim.

fannheyward avatar fannheyward commented on June 3, 2024

Do you use nvim-treesitter with ibl? I don't use ibl and treesitter but I knew ibl + nvim-treesitter may cause some slowness, disable treesitter and try again.

from coc.nvim.

TaylorTrz avatar TaylorTrz commented on June 3, 2024

Do you use nvim-treesitter with ibl? I don't use ibl and treesitter but I knew ibl + nvim-treesitter may cause some slowness, disable treesitter and try again.

Yes, after disable treesitter, I noticed an improvement in test results. About 20% time was reduced.

from coc.nvim.

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.