Neovim version (nvim -v)
NVIM v0.10.0-dev-1496+g4c8fdc018b
Operating system/version
Arch Linux
Add the debug logs
Log file
Log file: /tmp/nvim-minimal/state/nvim/conform.log │
``│ 17:29:56[INFO] Run prettierd on /home/pedro/Desktop/foo.md │
~ │ 17:29:56[DEBUG] Run command: { "prettierd", "/home/pedro/Desktop/foo.md" } │
~ │ 17:29:56[DEBUG] Run CWD: /home/pedro │
~ │ 17:29:57[DEBUG] prettierd exited with code 0 │
~ │ 17:29:57[INFO] Run injected on /home/pedro/Desktop/foo.md │
~ │ 17:29:57[DEBUG] Injected format python:4:4: { { │
~ │ available = true, │
~ │ command = "black", │
~ │ name = "black" │
~ │ } }
Formatters for this buffer: │
~ │prettierd ready (markdown) │
~ │injected ready (markdown) │
Describe the bug
The injected formatter doesn't appear to update the injected code in a markdown file
Steps To Reproduce
- Using the minimal init.lua file open nvim
- edit a foo.md file with
note there are closing backticks after the code block actually written as ``` (without the space)
3. :w write the file.
4. The python code is not formatted
Expected Behavior
Get the code block formatted as
Minimal example file
No response
Minimal init.lua
local root = '/tmp/nvim-minimal'
-- Set stdpaths to use root dir
for _, name in ipairs({ 'config', 'data', 'state', 'cache' }) do
vim.env[('XDG_%s_HOME'):format(name:upper())] = root .. '/' .. name
end
-- Bootstrap lazy
local lazypath = root .. '/plugins/lazy.nvim'
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
'git',
'clone',
'--filter=blob:none',
'--single-branch',
'https://github.com/folke/lazy.nvim.git',
lazypath,
})
end
vim.opt.runtimepath:prepend(lazypath)
-- Install plugins
local plugins = {
{
'nvim-treesitter/nvim-treesitter',
build = ':TSUpdate',
config = function()
require('nvim-treesitter.configs').setup({
ensure_installed = {
'markdown',
'markdown_inline',
'python',
},
})
end,
},
{
'stevearc/conform.nvim',
config = function()
require('conform').setup({
formatters_by_ft = {
markdown = { 'prettierd', 'injected' },
python = { 'black' },
},
format_on_save = function()
return { timeout_ms = 700, quiet = true, lsp_fallback = false }
end,
notify_on_error = true,
log_level = vim.log.levels.DEBUG,
})
end,
},
}
require('lazy').setup(plugins, {
root = root .. '/plugins',
})
Additional context

Neovim version (nvim -v)
NVIM v0.10.0-dev-1496+g4c8fdc018b
Operating system/version
Arch Linux
Add the debug logs
log_level = vim.log.levels.DEBUGand pasted the log contents below.Log file
Describe the bug
The injected formatter doesn't appear to update the injected code in a markdown file
Steps To Reproduce
note there are closing backticks after the code block actually written as ``` (without the space)
3.
:wwrite the file.4. The python code is not formatted
Expected Behavior
Get the code block formatted as
Minimal example file
No response
Minimal init.lua
Additional context