coc.nvim icon indicating copy to clipboard operation
coc.nvim copied to clipboard

[WIP] Use lua functions on neovim >= 0.6.0 for better performance

Open chemzqm opened this issue 2 years ago • 2 comments

The lua functions could be much faster, could help to reduce the block on neovim.

chemzqm avatar Feb 05 '22 06:02 chemzqm

Codecov Report

Merging #3621 (8427bdd) into master (122c248) will increase coverage by 0.01%. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3621      +/-   ##
==========================================
+ Coverage   76.65%   76.66%   +0.01%     
==========================================
  Files         203      203              
  Lines       20194    20194              
  Branches     4509     4509              
==========================================
+ Hits        15479    15482       +3     
+ Misses       2934     2932       -2     
+ Partials     1781     1780       -1     
Impacted Files Coverage Δ
src/model/task.ts 89.47% <0.00%> (-2.64%) :arrow_down:
src/completion/index.ts 75.05% <0.00%> (-0.24%) :arrow_down:
src/list/ui.ts 91.92% <0.00%> (+0.31%) :arrow_up:
src/core/documents.ts 89.23% <0.00%> (+0.61%) :arrow_up:
src/model/status.ts 92.85% <0.00%> (+4.76%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 122c248...8427bdd. Read the comment docs.

codecov[bot] avatar Feb 05 '22 06:02 codecov[bot]

Improved a lot compare with Vimscript in a large file.

Call Lua from Typescript directly should be better performance.

let curr = await this.nvim.lua(`return require('coc').getHighlights(...)`, [bufnr, ns]) as HighlightItemResult[]

Waiting for this PR to be merged.

kevinhwang91 avatar Feb 09 '22 04:02 kevinhwang91