We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
auto_close
auto_open
NVIM v0.10.0-dev-2949+g206475d79-Homebrew
MacOS 14.4.1
I can't get auto_open and auto_close to work even in the simplest configuration. Am I missing something?
nvim -u repro.lua
<leader>a
<leader>r
<leader>xx
I would expect the Trouble window to open after first <leader>a, and close after last <leader>r.
Actual behavior:
Thanks for the plugin!
Btw, the issue template for v3 doesn't contain branch = "dev", this may lead some people into installing v2 when creating MWEs by mistakes.
v3
branch = "dev"
v2
-- 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", keys = { { "<leader>xx", "<cmd>Trouble diagnostics toggle<cr>", desc = "Diagnostics (Trouble)", }, }, opts = { auto_close = true, auto_open = true, } }, { "nvim-treesitter/nvim-treesitter", build = ":TSUpdate", config = function () require("nvim-treesitter.configs").setup { ensure_installed = { "markdown", "markdown_inline" }, } end }, } require("lazy").setup(plugins, { root = root .. "/plugins", }) vim.cmd.colorscheme("tokyonight") -- add anything else here local ns = vim.api.nvim_create_namespace("test") vim.keymap.set("n", "<leader>a", function() print("Adding diagnostics") vim.diagnostic.set(ns, 0, {{ lnum=0, col=0, message="test", severity = vim.diagnostic.severity.ERROR, }}) end) vim.keymap.set("n", "<leader>r", function() print("Removing diagnostics") vim.diagnostic.reset() end)
The text was updated successfully, but these errors were encountered:
I have also noticed that the latest version of trouble auto closes too early (when resolving the current error, not all errors).
Sorry, something went wrong.
fix(tree): fixed tree item count. Fixes #419
562be92
Should be fixed now. Thank you for the detailed bug report!
0360dea
cb59440
Successfully merging a pull request may close this issue.
Did you check docs and existing issues?
Neovim version (nvim -v)
NVIM v0.10.0-dev-2949+g206475d79-Homebrew
Operating system/version
MacOS 14.4.1
Describe the bug
I can't get
auto_open
andauto_close
to work even in the simplest configuration. Am I missing something?Steps To Reproduce
nvim -u repro.lua
<leader>a
,<leader>r
<leader>xx
<leader>a
,<leader>r
Expected Behavior
I would expect the Trouble window to open after first
<leader>a
, and close after last<leader>r
.Actual behavior:
Screen.Recording.2024-04-18.at.15.26.16.mov
Thanks for the plugin!
Repro
Btw, the issue template for
v3
doesn't containbranch = "dev"
, this may lead some people into installingv2
when creating MWEs by mistakes.The text was updated successfully, but these errors were encountered: