[X] I have searched the existing issues of trouble.nvim
[X] I have searched the existing issues of plugins related to this issue
Neovim version (nvim -v)
0.9.5 Release
Operating system/version
EndeavorOS x86_64
Describe the bug
Editor shows an error Not an editor command: Trouble when executing Trouble from command mode, the command is not listed in :commands
Steps To Reproduce
Execute :Trouble, :Trouble diagnostics toggle, etc.
Expected Behavior
Visible Trouble buffer.
Repro
-- 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", "https://github.com/folke/lazy.nvim.git", lazypath, })
end
vim.opt.runtimepath:prepend(lazypath)
-- install plugins
local plugins = {
"folke/tokyonight.nvim",
{ "folke/trouble.nvim", branch = "dev" },
-- add any other plugins here
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
vim.cmd.colorscheme("tokyonight")
-- add anything else here
Found the issue. Adding opts = {} or manually calling .setup() registers the commands. I was under (wrong) assumption, that omitting opts would fallback to the default config.
Did you check docs and existing issues?
Neovim version (nvim -v)
0.9.5 Release
Operating system/version
EndeavorOS x86_64
Describe the bug
Editor shows an error
Not an editor command: Trouble
when executing Trouble from command mode, the command is not listed in:commands
Steps To Reproduce
:Trouble
,:Trouble diagnostics toggle
, etc.Expected Behavior
Visible Trouble buffer.
Repro