-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconform.lua
More file actions
30 lines (30 loc) · 730 Bytes
/
conform.lua
File metadata and controls
30 lines (30 loc) · 730 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
return {
"stevearc/conform.nvim",
event = { "BufWritePre" },
cmd = { "ConformInfo" },
keys = {
{
"fb",
function()
require("conform").format({ async = true })
end,
mode = "n",
desc = "(f)ormat (b)uffer using language formatter if available",
},
{
"<C-I>",
function()
require("conform").format({ async = true })
end,
mode = "n",
desc = "format current buffer using language formatter if available",
},
},
opts = function()
return require("cgnvim.configs.conform")
end,
init = function()
-- If you want the formatexpr, here is the place to set it
vim.o.formatexpr = "v:lua.require'conform'.formatexpr()"
end,
}