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

cmd does not accept range #93

Closed
nazo6 opened this issue Dec 22, 2022 · 0 comments · Fixed by #76
Closed

cmd does not accept range #93

nazo6 opened this issue Dec 22, 2022 · 0 comments · Fixed by #76
Labels
bug Something isn't working

Comments

@nazo6
Copy link

nazo6 commented Dec 22, 2022

Describe the bug
E481: No range allowed is shown when called command which is defined in lazy config.

Which version of Neovim are you using?
nightly

To Reproduce

Steps to reproduce the behavior:

  1. Use below repro.lua
  2. Execute :0ToggleTerm
  3. Error is shown

Expected Behavior
No error is shown and range is passed to actual command.

repro.lua
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 = {
	-- do not remove the colorscheme!
	"folke/tokyonight.nvim",
	-- add any other pugins here
	{
		"akinsho/toggleterm.nvim",
		cmd = "ToggleTerm",
		config = function()
			vim.cmd([[nnoremap <silent><c-t> <Cmd>exe v:count1 . "ToggleTerm"<CR>]])
		end,
	},
}
require("lazy").setup(plugins, {
	root = root .. "/plugins",
})

-- add anything else here
vim.opt.termguicolors = true
-- do not remove the colorscheme!
vim.cmd([[colorscheme tokyonight]])


</details>
@nazo6 nazo6 added the bug Something isn't working label Dec 22, 2022
@folke folke closed this as completed in c0c2e1b Dec 22, 2022
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

Successfully merging a pull request may close this issue.

1 participant