aboutsummaryrefslogtreecommitdiffstats
path: root/doc/recipes.md
diff options
context:
space:
mode:
authorSteven Arcangeli <506791+stevearc@users.noreply.github.com>2023-09-29 11:56:21 -0700
committerGitHub <noreply@github.com>2023-09-29 11:56:21 -0700
commita5526fb2ee963cf426ab6d6ba1f3eb82887b1c22 (patch)
tree23961a5cbc439b67efac3c1f2b22b1fb97411172 /doc/recipes.md
parent388d6e2440bccded26d5e67ce6a7039c1953ae70 (diff)
feat: format injected languages (#83)
Diffstat (limited to 'doc/recipes.md')
-rw-r--r--doc/recipes.md15
1 files changed, 8 insertions, 7 deletions
diff --git a/doc/recipes.md b/doc/recipes.md
index 66bc662..40d2c0f 100644
--- a/doc/recipes.md
+++ b/doc/recipes.md
@@ -41,11 +41,12 @@ require("conform.formatters.yamlfix").env = {
}
-- Or create your own formatter that overrides certain values
-require("conform").formatters.yamlfix = vim.tbl_deep_extend("force", require("conform.formatters.yamlfix"), {
- env = {
- YAMLFIX_SEQUENCE_STYLE = "block_style",
- },
-})
+require("conform").formatters.yamlfix =
+ vim.tbl_deep_extend("force", require("conform.formatters.yamlfix"), {
+ env = {
+ YAMLFIX_SEQUENCE_STYLE = "block_style",
+ },
+ })
-- Here is an example that modifies the command arguments for prettier to add
-- a custom config file, if it is present
@@ -188,8 +189,8 @@ require("conform").formatters.prettier = vim.tbl_deep_extend("force", prettier,
-- Pass append=true to append the extra arguments to the end
local deno_fmt = require("conform.formatters.deno_fmt")
-require("conform").formatters.deno_fmt = vim.tbl_deep_extend('force', deno_fmt, {
- args = util.extend_args(deno_fmt.args, { "--use-tabs" }, { append = true })
+require("conform").formatters.deno_fmt = vim.tbl_deep_extend("force", deno_fmt, {
+ args = util.extend_args(deno_fmt.args, { "--use-tabs" }, { append = true }),
})
-- There is also a utility to modify a formatter in-place