Skip to content
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

Plugin conflicts with 'jiaoshijie/undotree' #10

Open
comiluv opened this issue Sep 13, 2024 · 0 comments
Open

Plugin conflicts with 'jiaoshijie/undotree' #10

comiluv opened this issue Sep 13, 2024 · 0 comments

Comments

@comiluv
Copy link

comiluv commented Sep 13, 2024

Description

With 'jiaoshijie/undotree' installed at the same time, when the user presses <leader>u for that plugin's functionality, remember.nvim prints error messages such as below and prevents the other plugin from showing undotree:

E5108: Error executing lua vim/_editor.lua:431: nvim_exec2()..BufWinEnter Autocommands for "*": Vim(append):Error executing lua callback: Vim:E944: Reverse range in character class
stack traceback:
	[C]: in function 'glob'
	...Data/Local/nvim-data/lazy/remember.nvim/lua/remember.lua:59: in function 'set_cursor_position'
	...Data/Local/nvim-data/lazy/remember.nvim/lua/remember.lua:99: in function <...Data/Local/nvim-data/lazy/remember.nvim/lua/remember.lua:98>
	[C]: in function 'nvim_exec2'
	vim/_editor.lua:431: in function 'cmd'
	...al/nvim-data/lazy/undotree/lua/undotree/split_window.lua:54: in function 'create'
	...Local/nvim-data/lazy/undotree/lua/undotree/collector.lua:137: in function 'run'
	...j/AppData/Local/nvim-data/lazy/undotree/lua/undotree.lua:21: in function 'toggle'
	[string ":lua"]:1: in main chunk
stack traceback:
	[C]: in function 'nvim_exec2'
	vim/_editor.lua:431: in function 'cmd'
	...al/nvim-data/lazy/undotree/lua/undotree/split_window.lua:54: in function 'create'
	...Local/nvim-data/lazy/undotree/lua/undotree/collector.lua:137: in function 'run'
	...j/AppData/Local/nvim-data/lazy/undotree/lua/undotree.lua:21: in function 'toggle'
	[string ":lua"]:1: in main chunk

Minimal init.lua to reproduce the issue

vim.g.mapleader = " "
-- auto install folke/lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
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)

local plugins = {
	{
		"vladdoster/remember.nvim",
		config = true,
	}, 
	{
		"jiaoshijie/undotree",
		dependencies = "nvim-lua/plenary.nvim",
		config = true,
		keys = { -- load the plugin only when using it's keybinding:
			{ "<leader>u", "<cmd>lua require('undotree').toggle()<cr>" },
		},
	},
}

require("lazy").setup(plugins, {})

Steps to reproduce the issue

  1. Open any file in neovim
  2. Press <leader>u
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant