Closed Ultra-Code closed 1 year ago
idk what's meaning ? what's problem you get ?
After adding indentmini to my plugins, nvim hangs when opening files that contain indentations. Using indent-blankline work but I want to use indentmini.
for my daily usage it works fine T.T
Can you give me pointers as to how to debug the plugin during nvim startup so that I can get more conclusive information that will help fix this bug? I tried running nvim with --startuptime
option but since it hangs the whole terminal, I have to kill the terminal instance thereby prevent me from getting any information.
Kindly test it out with my configuration,replace the indent-blankline's configuration with below and see if you have any issues.
{
"nvimdev/indentmini.nvim",
event = { "BufReadPost", "BufNewFile" },
opts = {
char = "│",
exclude = {
"help",
"alpha",
"dashboard",
"neo-tree",
"Trouble",
"lazy",
"mason",
"notify",
"toggleterm",
"lazyterm",
},
},
},
System Info:
OS: Arch Linux on Windows 10 x86_64
Kernel: 5.15.90.1-microsoft-standard-WSL2
Uptime: 18 mins
Packages: 255 (pacman)
Shell: zsh 5.9
DE: sway
Terminal: Neovim Terminal
CPU: 11th Gen Intel i5-1135G7 (8) @ 2.419GHz
GPU: cbde:00:00.0 Microsoft Corporation Basic Render Driver
Memory: 1318MiB / 3783MiB
When I get home I will try on my Archlinux box and see if I get the same behavior.
could you try use event ='BufEnter
?
@glepnir I tried BufEnter
before using "BufReadPost", "BufNewFile"
but same behavior
touch min.lua
and put these lines . nvim --clean -u min.lua
edit file . try this test..
vim.opt.rtp:append('path/to/indentmini.nvim')
require('indentmini').setup({})
The above min repro also hangs nvim.
hmm it's wired test case and some people usage also good ..
Manually debugging the sources, I have been able to narrow it down to the loop in the on_line fn
in indentline fn
.
it should not hang your neovim. which file can you share with me or some reproduce code ?
basically opening any file with indentation hangs it, sample file.
using vim.fn.shiftwidth()
instead of vim.bo[bufnr].sw
as the loop step variable fixes this issue for me.
I will do a pr for this fix if you are in agreement. Or we could use the suggestion in the [shiftwidth()](https://neovim.io/doc/user/builtin.html#shiftwidth()) documentation.
But now, I have another issue, the lines aren't faint as with indent-blankline
, Is there a way to make the lines faint so that they are not distracting?
only highlight current in my plan recently will write.
@glepnir what are you opinion about using shiftwidth()
in place of vim.bo[bufnr].sw
since one is buffer-local and the other is the effective shift. In my instance, shiftwidth
is always the same value as vim.bo[vim.fn.bufnr()].sw
after enabling this plugin I am unable to open and edit a file, nvim gets stack opening the file.
NVIM v0.9.1 Build type: Release LuaJIT 2.1.0-beta3
I use
lazy
as my plugin manager