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
|
local extensions = {
javascript = "js",
javascriptreact = "jsx",
json = "json",
jsonc = "jsonc",
markdown = "md",
typescript = "ts",
typescriptreact = "tsx",
}
---@type conform.FileFormatterConfig
return {
meta = {
url = "https://deno.land/manual/tools/formatter",
description = "Use [Deno](https://deno.land/) to format TypeScript, JavaScript/JSON and markdown.",
},
command = "deno",
args = function(self, ctx)
return {
"fmt",
"-",
"--ext",
extensions[vim.bo[ctx.buf].filetype],
}
end,
}
|