Skip to content

Forward Incompatibility with Neovim 0.11 #948

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
Qkessler opened this issue Mar 27, 2025 · 3 comments
Closed

Forward Incompatibility with Neovim 0.11 #948

Qkessler opened this issue Mar 27, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@Qkessler
Copy link

Describe the bug

Hi there!

Thanks so much for the work on this plugin, using it daily! Yesterday, the Neovim 0.11 version was released. I imagine people will slowly migrate to it. Sadly, upgrading both the neovim version and the package, every time I open nvim it crashes.

I have pinpointed the issue to be with nvim-orgmode/orgmode, particularly around the call to:

    config = function(_, opts)
      -- require('orgmode').setup(opts) -- THIS setup call makes `neovim` crash.
      vim.b.org_indent_mode = false
      require('nvim-treesitter.configs').setup {
        ignore_install = { 'org' },
      }

I'll work on reproducing the bug with a minimal configuration and I'll let you know.

Steps to reproduce

Using this minimal configuration, I'm not able to reproduce the issue, though I don't have any additional configuration to it:

local tmp_dir = vim.env.TMPDIR or vim.env.TMP or vim.env.TEMP or "/tmp"
local nvim_root = tmp_dir .. "/nvim_orgmode"
local lazy_root = nvim_root .. "/lazy"
local lazypath = lazy_root .. "/lazy.nvim"

for _, name in ipairs({ "config", "data", "state", "cache" }) do
	vim.env[("XDG_%s_HOME"):format(name:upper())] = nvim_root .. "/" .. name
end

-- Install lazy.nvim if not already installed
if not vim.loop.fs_stat(lazypath) then
	vim.fn.system({
		"git",
		"clone",
		"--filter=blob:none",
		"https://github.com/folke/lazy.nvim.git",
		"--branch=stable", -- latest stable release
		lazypath,
	})
end
vim.opt.rtp:prepend(lazypath)

require("lazy").setup({
	{
		"nvim-orgmode/orgmode",
		event = "VeryLazy",
		ft = { "org" },
		config = function()
			require("orgmode").setup({
				org_agenda_files = {
					"*.org",
				},
			})
		end,
	},
}, {
	root = lazy_root,
	lockfile = nvim_root .. "/lazy.json",
	install = {
		missing = false,
	},
})

require("lazy").sync({
	wait = true,
	show = false,
})

Here's my Lazy config:

  {
    'nvim-orgmode/orgmode',
    dependencies = {
      { 'nvim-treesitter/nvim-treesitter', lazy = true },
    },
    event = 'VeryLazy',
    keys = {
      { '<leader>oa', '<cmd>Org agenda d<cr>', desc = '[O]rg [A]genda' },
      { '<leader>oc', '<cmd>Org capture t<cr>', desc = '[O]rg [C]apture' },
    },
    config = function(_, opts)
      require('orgmode').setup(opts)
      -- vim.b.org_indent_mode = false
      require('nvim-treesitter.configs').setup {
        ignore_install = { 'org' },
      }
      -- vim.api.nvim_set_hl(0, '@org.agenda.scheduled', { fg = '#AAFFAA' })
    end,
  },

I have done a binary search across the plugins and this is the only one that's causing nvim to crash.

Expected behavior

I expect to be able to access .org files and the plugin's functionality without it crashing nvim.

Emacs functionality

N/A

Minimal init.lua

local tmp_dir = vim.env.TMPDIR or vim.env.TMP or vim.env.TEMP or "/tmp"
local nvim_root = tmp_dir .. "/nvim_orgmode"
local lazy_root = nvim_root .. "/lazy"
local lazypath = lazy_root .. "/lazy.nvim"

for _, name in ipairs({ "config", "data", "state", "cache" }) do
	vim.env[("XDG_%s_HOME"):format(name:upper())] = nvim_root .. "/" .. name
end

-- Install lazy.nvim if not already installed
if not vim.loop.fs_stat(lazypath) then
	vim.fn.system({
		"git",
		"clone",
		"--filter=blob:none",
		"https://github.com/folke/lazy.nvim.git",
		"--branch=stable", -- latest stable release
		lazypath,
	})
end
vim.opt.rtp:prepend(lazypath)

require("lazy").setup({
	{
		"nvim-orgmode/orgmode",
		event = "VeryLazy",
		ft = { "org" },
		config = function()
			require("orgmode").setup({
				org_agenda_files = {
					"*.org",
				},
			})
		end,
	},
}, {
	root = lazy_root,
	lockfile = nvim_root .. "/lazy.json",
	install = {
		missing = false,
	},
})

require("lazy").sync({
	wait = true,
	show = false,
})

Screenshots and recordings

No response

nvim-orgmode version

0.11

OS / Distro

MacOS Sequoia 15.3.2

Neovim version/commit

0.11

Additional context

No response

@Qkessler Qkessler added the bug Something isn't working label Mar 27, 2025
@Qkessler
Copy link
Author

Did do it in 0.10 and also failed to run it correctly when I run require("orgmode").setup({}).

@Qkessler
Copy link
Author

It's starting to sound like a cache issue or something similar.

@Qkessler
Copy link
Author

Yep, correct. Fixed it by doing a fresh install of all the Lazy plugins and removing the state:

 rm -rf ~/.config/nvim ~/.local/share/nvim ~/.local/state/nvim 

Then upgraded nvim back to 0.11 and reran nvim. Everything ran correctly. Closing.

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

1 participant