Closed meijieru closed 1 year ago
tail -f ~/.cache/nvim/ufo.log
in a shell;UFO_LOG=trace nvim
and reproduce the issue;Sorry for late reply.
The log is attached below
[23-05-27 06:12:53] [TRACE] event.lua:52 : event: BufAttach listeners: { <function 1> } args: 1
[23-05-27 06:12:53] [DEBUG] init.lua:128 : attach bufnr: 1
[23-05-27 06:12:53] [TRACE] event.lua:52 : event: TextChanged listeners: { <function 1> } args: 1
[23-05-27 06:12:55] [TRACE] event.lua:52 : event: BufDetach listeners: { <function 1>, <function 2>, <function 3> } args: 1
[23-05-27 06:12:55] [TRACE] event.lua:52 : event: BufEnter listeners: { <function 1>, <function 2> } args: 3
[23-05-27 06:12:55] [TRACE] event.lua:52 : event: BufAttach listeners: { <function 1> } args: 3
[23-05-27 06:12:55] [DEBUG] init.lua:128 : attach bufnr: 3
[23-05-27 06:13:18] [TRACE] event.lua:52 : event: InsertLeave listeners: { <function 1> } args: 3
The UfoInspect
shows it's still starting after 10s
Buffer: 3
Fold Status: start
Main provider: lsp
Fallback provider: indent
Selected provider: nil
Fold kinds:
This is normal log, I guess the issue is plugins conflict, please use binary search and debug yourself.
[23-05-28 22:02:03] [TRACE] event.lua:52 : event: BufAttach listeners: { <function 1> } args: 3
[23-05-28 22:02:03] [DEBUG] init.lua:128 : attach bufnr: 3
[23-05-28 22:02:03] [DEBUG] decorator.lua:77 : folded lnums: {} didOpen: false
[23-05-28 22:02:03] [INFO] init.lua:89 : providers: { "lsp", "indent" }
[23-05-28 22:02:03] [DEBUG] decorator.lua:77 : folded lnums: {} didOpen: false
[23-05-28 22:02:03] [DEBUG] init.lua:53 : requestFoldingRange({ "lsp", "indent" }, 3) has elapsed: 191ms
[23-05-28 22:02:03] [INFO] init.lua:96 : selected provider: lsp
[23-05-28 22:02:03] [INFO] manager.lua:204 : apply fold ranges: { {
endLine = 151,
kind = "region",
startLine = 146
}, {
endLine = 143,
kind = "region",
startLine = 141
}, {
endLine = 138,
kind = "region",
startLine = 134
}, {
endLine = 131,
kind = "region",
startLine = 129
}, {
endLine = 126,
kind = "region",
startLine = 124
}, {
endLine = 121,
kind = "region",
startLine = 118
}, {
endLine = 112,
kind = "region",
startLine = 111
}, {
endLine = 107,
kind = "region",
startLine = 106
}, {
endLine = 108,
kind = "region",
startLine = 105
}, {
endLine = 101,
kind = "region",
startLine = 100
}, {
endLine = 93,
kind = "region",
startLine = 92
}, {
endLine = 115,
kind = "region",
startLine = 89
}, {
endLine = 82,
kind = "region",
startLine = 81
}, {
endLine = 86,
kind = "region",
startLine = 80
}, {
endLine = 64,
kind = "region",
startLine = 63
}, {
endLine = 77,
kind = "region",
startLine = 62
}, {
endLine = 58,
kind = "region",
startLine = 51
}, {
endLine = 59,
kind = "region",
startLine = 50
}, {
endLine = 45,
kind = "region",
startLine = 43
}, {
endLine = 46,
kind = "region",
startLine = 42
}, {
endLine = 38,
kind = "region",
startLine = 37
}, {
endLine = 35,
kind = "region",
startLine = 33
}, {
endLine = 28,
kind = "region",
startLine = 20
}, {
endLine = 47,
kind = "region",
startLine = 18
} }
[23-05-28 22:02:03] [INFO] manager.lua:205 : apply fold rowPairs: {}
[23-05-28 22:02:03] [DEBUG] decorator.lua:77 : folded lnums: {} didOpen: false
Thanks for the guidance, would check that.
Neovim version (nvim -v | head -n1)
NVIM v0.9.0-dev-1206+g829d92eca3
Operating system/version
archlinux
How to reproduce the issue
I have the following setup for ufo
Expected behavior
The initial fold takes >10s. I tried even
{"indent"}
fallback, which doesn't help.Actual behavior
Initial fold shouldn't be so slow.