Neovim version (nvim -v)
NVIM v0.10.4
Operating system/version
Debian GNU/Linux 13 (trixie)
Read debugging tips
Add the debug logs
Log file
N/A
Describe the bug
The M.formatexpr = function(opts) defined in lua/conform/init.lua uses custom default value for timeout_ms. So, when running M.format(opts) the default timeout from default_format_opts is not used.
The workaround that I have:
vim.o.formatexpr = "v:lua.myformatexpr()"
_G.myformatexpr = function()
require("conform").formatexpr({ timeout_ms = 2000 })
end
What is the severity of this bug?
tolerable (can work around it)
Steps To Reproduce
vim.o.formatexpr = "v:lua.require('conform').formatexpr()"
require("conform").setup({
default_format_opts = { timeout_ms = 2000 },
})
gq still timeouts after 500 ms.
Expected Behavior
If some values are set in the default_format_opts, they should be used as defaults defaults in the M.formatexpr.
Minimal example file
No response
Minimal init.lua
Additional context
No response
Neovim version (nvim -v)
NVIM v0.10.4
Operating system/version
Debian GNU/Linux 13 (trixie)
Read debugging tips
Add the debug logs
log_level = vim.log.levels.DEBUGand pasted the log contents below.Log file
N/A
Describe the bug
The
M.formatexpr = function(opts)defined inlua/conform/init.luauses custom default value fortimeout_ms. So, when runningM.format(opts)the default timeout fromdefault_format_optsis not used.The workaround that I have:
What is the severity of this bug?
tolerable (can work around it)
Steps To Reproduce
gqstill timeouts after 500 ms.Expected Behavior
If some values are set in the
default_format_opts, they should be used as defaults defaults in theM.formatexpr.Minimal example file
No response
Minimal init.lua
Additional context
No response