aboutsummaryrefslogtreecommitdiffstats
path: root/doc
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
parent388d6e2440bccded26d5e67ce6a7039c1953ae70 (diff)
feat: format injected languages (#83)
Diffstat (limited to 'doc')
-rw-r--r--doc/conform.txt1
-rw-r--r--doc/recipes.md15
2 files changed, 9 insertions, 7 deletions
diff --git a/doc/conform.txt b/doc/conform.txt
index 4e0910e..c30c28f 100644
--- a/doc/conform.txt
+++ b/doc/conform.txt
@@ -196,6 +196,7 @@ FORMATTERS *conform-formatter
`htmlbeautifier` - A normaliser/beautifier for HTML that also understands
embedded Ruby. Ideal for tidying up Rails templates.
`indent` - GNU Indent
+`injected` - Format treesitter injected languages.
`isort` - Python utility / library to sort imports alphabetically and
automatically separate them into sections and by type.
`jq` - Command-line JSON processor.
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