mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-21 00:25:47 +02:00
add: config disable format onsave on conform
This commit is contained in:
parent
5fe2180144
commit
c762b2584d
1 changed files with 16 additions and 8 deletions
|
@ -76,14 +76,22 @@ return {
|
|||
end
|
||||
end
|
||||
|
||||
return {
|
||||
format_on_save = {
|
||||
lsp_fallback = true,
|
||||
timeout_ms = pcode.format_timeout_ms or 5000,
|
||||
},
|
||||
formatters = formatters,
|
||||
formatters_by_ft = formatters_by_ft,
|
||||
}
|
||||
local onsave = pcode.format_on_save or false
|
||||
if onsave then
|
||||
return {
|
||||
format_on_save = {
|
||||
lsp_fallback = true,
|
||||
timeout_ms = pcode.format_timeout_ms or 5000,
|
||||
},
|
||||
formatters = formatters,
|
||||
formatters_by_ft = formatters_by_ft,
|
||||
}
|
||||
else
|
||||
return {
|
||||
formatters = formatters,
|
||||
formatters_by_ft = formatters_by_ft,
|
||||
}
|
||||
end
|
||||
end,
|
||||
config = function(_, opts)
|
||||
local conform = require("conform")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue