I am following the Full Spec from the official documentation to configure conform.nvim for Lazy-Vim

However, I'm encountering multiple errors, one of which is that Util is not recognized, even though I believe it should be defined through some sort of initialization by lazy-vim itself.

Here are all the errors I encountered:

Undefined global Util.
Undefined global conform_opts.
Undefined type or alias conform.FormatterUnit.
Cannot assign string to conform.FormatterUnit.
Undefined type or alias conform.FormatterConfigOverride.

The official sample appears to have numerous errors. Is there an additional step I missed, or is the sample not intended for direct use? Any help resolving these issues would be appreciated.

1 Answer 1


I have the same problem... This is my solution:

local M = {}
local Util = require("lazyvim.util")

You can find it in: https://github.com/LazyVim/LazyVim/tree/main/lua/lazyvim/util

This is my config for conform.nvim: https://raw.githubusercontent.com/luismanolo/nvim/develop/lua/plugins/conform.lua

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.