-
Notifications
You must be signed in to change notification settings - Fork 267
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Neovim version (nvim -v)
NVIM v0.10.4
Operating system/version
Debian GNU/Linux 13 (trixie)
Read debugging tips
- I have read through the debugging tips.
Add the debug logs
- I have set
log_level = vim.log.levels.DEBUGand pasted the log contents below.
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 })
endWhat 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
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working