aboutsummaryrefslogtreecommitdiffstats
path: root/doc/advanced_topics.md
diff options
context:
space:
mode:
authorSteven Arcangeli <stevearc@stevearc.com>2023-11-17 22:55:27 -0800
committerSteven Arcangeli <stevearc@stevearc.com>2023-11-18 00:38:30 -0800
commiteeef88849fb644d84a5856524adf10d0ad2d7cbe (patch)
tree2d9944631bc4c542587990306e005178f958a14c /doc/advanced_topics.md
parentc2963fd63859e51f468caae7d599cd4b30bfd2a3 (diff)
fix: injected parser shouldn't format combined injections (#205)
Diffstat (limited to 'doc/advanced_topics.md')
-rw-r--r--doc/advanced_topics.md2
1 files changed, 2 insertions, 0 deletions
diff --git a/doc/advanced_topics.md b/doc/advanced_topics.md
index 71aadf9..bc66f4f 100644
--- a/doc/advanced_topics.md
+++ b/doc/advanced_topics.md
@@ -22,6 +22,8 @@ The way this "aftermarket" range formatting works is conform will format the ent
## Injected language formatting (code blocks)
+Requires: Neovim 0.9+
+
Sometimes you may have a file that contains small chunks of code in another language. This is most common for markup formats like markdown and neorg, but can theoretically be present in any filetype (for example, embedded SQL queries in a host language). For files like this, it would be nice to be able to format these code chunks using their language-specific formatters.
The way that conform supports this is via the `injected` formatter. If you run this formatter on a file, it will use treesitter to parse out the blocks in the file that have different languages and runs the formatters for that filetype (configured with `formatters_by_ft`). The formatters are run in parallel, one job for each language block.