Skip to content

Commit df83eea

Browse files
xulongwu4Copilot
andauthored
fix: formatexpr uses the same options as conform.format() (#837)
* Make formatexpr use the same option as conform.format() * Update lua/conform/init.lua Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]>
1 parent 5420c4b commit df83eea

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lua/conform/init.lua

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -832,10 +832,8 @@ M.get_formatter_info = function(formatter, bufnr)
832832
end
833833

834834
M.formatexpr = function(opts)
835-
-- Change the defaults slightly from conform.format
835+
-- Use the same defaults as conform.format(), but force async = false and handle the range
836836
opts = vim.tbl_deep_extend("keep", opts or {}, {
837-
timeout_ms = 500,
838-
lsp_format = "fallback",
839837
bufnr = vim.api.nvim_get_current_buf(),
840838
})
841839
-- Force async = false

0 commit comments

Comments
 (0)