Skip to content

bug: receiving nvim version error with conform v7.1.0 #676

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
2 tasks done
user520881 opened this issue Mar 24, 2025 · 2 comments
Closed
2 tasks done

bug: receiving nvim version error with conform v7.1.0 #676

user520881 opened this issue Mar 24, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@user520881
Copy link

Neovim version (nvim -v)

NVIM v0.9.0

Operating system/version

Windows 10

Read debugging tips

Add the debug logs

  • I have set log_level = vim.log.levels.DEBUG and pasted the log contents below.

Log file

no conform.log is produced with this error.

Describe the bug

I am running nvim 0.9.0 so am trying to use an older version of this plugin. I have pinned conform v7.1.0 to the lazy package manager using the tag attribute. However when i launch nvim i am still getting error message 'conform.nvim requires nvim 0.10+'.

also tried the branch and version attributes in lazy.nvim and receive the same error. I am not able to run any formatting and no log file is produced.

see minimal init.lua below for my conform config.

What is the severity of this bug?

blocking (cannot use plugin)

Steps To Reproduce

  1. install nvim 0.9.0
  2. install lazy.nvim
  3. add conform plugin to lazy.nvim using the below configuration
  4. launch nvim

Expected Behavior

i should be able to use conform.nvim as i am using v7.1.0 with nvim 0.9.0

Minimal example file

No response

Minimal init.lua

-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
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 = {
  "folke/tokyonight.nvim",
	{
	  'stevearc/conform.nvim',
	  dependencies = { 'nvim-lua/plenary.nvim' },
	  tag = "v7.1.0",
	  --branch = "nvim-0.9",
	  --version = "7.1.0",
	  config = function()
		  require("conform").setup({
			  log_level = vim.log.levels.ERROR,
			  formatters_by_ft = {
				lua = { "stylua" },
				-- Conform will run multiple formatters sequentially
				python = { "isort", "black" },
			  },
			  format_on_save = {
				-- These options will be passed to conform.format()
				timeout_ms = 2000,
				lsp_format = "fallback",
			  },
		})
	  end
	},
	
  -- add any other plugins here
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

vim.cmd.colorscheme("tokyonight")
-- add anything else here

Additional context

No response

@user520881 user520881 added the bug Something isn't working label Mar 24, 2025
@stevearc
Copy link
Owner

If you are getting the error message conform.nvim requires nvim 0.10+ then you are not on the correct version, because that string did not exist in the source code until it was updated. This sounds like either a bug or a configuration issue with lazy.nvim. FWIW I tried the repro.lua file and it worked fine for me; installed the correct version. I tested on a mac, though, so there is a remote possibility that there is some Windows-specific issue.

@user520881
Copy link
Author

my bad, i had not explicitly updated the lazy-lock file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants