smjonas/live-command.nvim

Plugin stops working after trying vim-abolish command

comiluv opened this issue · 0 comments

Description

With vim-abolish installed, live-command.nvim stops working after trying to preview vim-abolish Subvert command

Neovim version

v0.10.1

How to reproduce

  1. Use this minimal init.lua
vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()

require("lazy.minit").repro({
	spec = {
		"tpope/vim-abolish",
		{
			"smjonas/live-command.nvim",
			version = "^2.",
			opts = {
				commands = {
					As = { cmd = "Subvert" },
					Norm = { cmd = "norm" },
				},
			},
			config = function(_, opts)
				require("live-command").setup(opts)
			end,
		},
	},
})
  1. Open the init.lua file
  2. On the first line, do :As/lazy/live/g
  3. Then, :Preview norm A; without pressing <CR>
  4. See error

What happens

live-command.nvim does not show ; at the end of the line

What's expected

live-command.nvim shows ; at the end of the line

Notes

Other live-commands such as '<,'>Preview delete also becomes unavailable

Output of :LiveCommand log

[TRACE] did not refetch for cmd Subvert /
[ERROR] An error occurred in the preview function:
"Error executing Lua callback: ...lazy/live-command.nvim/lua/live-command/cmd_executor.lua:44: Error executing lua: vim/_editor.lua:431: nvim_exec2()..function <SNR>6_subvert_dispatcher[2]..<SNR>6_parse_subvert[9]..<SNR>6_parse_substitute[9]..<SNR>6_throw, line 2: Abolish: E471: Argument required\nstack traceback:\n\t[C]: in function 'nvim_exec2'\n\tvim/_editor.lua:431: in function 'cmd'\n\t...lazy/live-command.nvim/lua/live-command/cmd_executor.lua:45: in function <...lazy/live-command.nvim/lua/live-command/cmd_executor.lua:44>\n\t[C]: in function 'nvim_buf_call'\n\t...lazy/live-command.nvim/lua/live-command/cmd_executor.lua:44: in function 'execute_command'\n\t...lazy/live-command.nvim/lua/live-command/cmd_executor.lua:67: in function 'submit_command'\n\t...im-data/lazy/live-command.nvim/lua/live-command/init.lua:72: in function <...im-data/lazy/live-command.nvim/lua/live-command/init.lua:63>\nstack traceback:\n\t[C]: in function 'nvim_buf_call'\n\t...lazy/live-command.nvim/lua/live-command/cmd_executor.lua:44: in function 'execute_command'\n\t...lazy/live-command.nvim/lua/live-command/cmd_executor.lua:67: in function 'submit_command'\n\t...im-data/lazy/live-command.nvim/lua/live-command/init.lua:72: in function <...im-data/lazy/live-command.nvim/lua/live-command/init.lua:63>"
[ERROR] An error occurred in the preview function:
"Error executing Lua callback: ...lazy/live-command.nvim/lua/live-command/cmd_executor.lua:44: Error executing lua: vim/_editor.lua:431: nvim_exec2()..function <SNR>6_subvert_dispatcher[2]..<SNR>6_parse_subvert[9]..<SNR>6_parse_substitute[9]..<SNR>6_throw, line 2: Abolish: E471: Argument required\nstack traceback:\n\t[C]: in function 'nvim_exec2'\n\tvim/_editor.lua:431: in function 'cmd'\n\t...lazy/live-command.nvim/lua/live-command/cmd_executor.lua:45: in function <...lazy/live-command.nvim/lua/live-command/cmd_executor.lua:44>\n\t[C]: in function 'nvim_buf_call'\n\t...lazy/live-command.nvim/lua/live-command/cmd_executor.lua:44: in function 'execute_command'\n\t...lazy/live-command.nvim/lua/live-command/cmd_executor.lua:67: in function 'submit_command'\n\t...im-data/lazy/live-command.nvim/lua/live-command/init.lua:72: in function <...im-data/lazy/live-command.nvim/lua/live-command/init.lua:63>\nstack traceback:\n\t[C]: in function 'nvim_buf_call'\n\t...lazy/live-command.nvim/lua/live-command/cmd_executor.lua:44: in function 'execute_command'\n\t...lazy/live-command.nvim/lua/live-command/cmd_executor.lua:67: in function 'submit_command'\n\t...im-data/lazy/live-command.nvim/lua/live-command/init.lua:72: in function <...im-data/lazy/live-command.nvim/lua/live-command/init.lua:63>"
[ERROR] An error occurred in the preview function:
"Error executing Lua callback: ...lazy/live-command.nvim/lua/live-command/cmd_executor.lua:44: Error executing lua: vim/_editor.lua:431: nvim_exec2()..function <SNR>6_subvert_dispatcher[2]..<SNR>6_parse_subvert[9]..<SNR>6_parse_substitute[9]..<SNR>6_throw, line 2: Abolish: E471: Argument required\nstack traceback:\n\t[C]: in function 'nvim_exec2'\n\tvim/_editor.lua:431: in function 'cmd'\n\t...lazy/live-command.nvim/lua/live-command/cmd_executor.lua:45: in function <...lazy/live-command.nvim/lua/live-command/cmd_executor.lua:44>\n\t[C]: in function 'nvim_buf_call'\n\t...lazy/live-command.nvim/lua/live-command/cmd_executor.lua:44: in function 'execute_command'\n\t...lazy/live-command.nvim/lua/live-command/cmd_executor.lua:67: in function 'submit_command'\n\t...im-data/lazy/live-command.nvim/lua/live-command/init.lua:72: in function <...im-data/lazy/live-command.nvim/lua/live-command/init.lua:63>\nstack traceback:\n\t[C]: in function 'nvim_buf_call'\n\t...lazy/live-command.nvim/lua/live-command/cmd_executor.lua:44: in function 'execute_command'\n\t...lazy/live-command.nvim/lua/live-command/cmd_executor.lua:67: in function 'submit_command'\n\t...im-data/lazy/live-command.nvim/lua/live-command/init.lua:72: in function <...im-data/lazy/live-command.nvim/lua/live-command/init.lua:63>"