trouble.nvim
trouble.nvim copied to clipboard
Is there a way to disable folding?
Folding is causing me some grief - I inadvertently fold/unfold items and then it's difficult to switch back to editing. Is there an easy way to disable folding? It's ok (preferred, actually) to have the errors grouped by filename; I just don't want that list to collapse. Thank you.
(The ideal setup would be that c-n and c-p in the trouble window would not move to the filename or the blank line above it; I'd like the next/prev just to be issues that need fixing.)
I just pushed a new version including some API methods you can use to achieve this. Create your own bindings using the API at docs
This works really well, but it would be great if it would update the highlight line in the trouble window to correspond to the error on the given line. Is that possible?
It does that already, no? Do you have any code that disables the cursorline for inactive windows?
Do you have any code that disables the cursorline for inactive windows?
I don't think so. How can I check?
run :verbose au InsertLeave and check for something that does set nocursorline
sorry, probably :verbose au WinLeave
:verbose au InsertLeave
--- Autocommands ---
InsertLeave
* lua require'lsp_extensions'.inlay_hints{ prefix = '', highlight = "Comment", enabled = {"TypeHint", "Chain
ingHint", "ParameterHint"} }
Last set from ~/dotfiles/elemental/.config/nvim/after/ftplugin/rust.vim line 1
CompletionCommand InsertLeave
<buffer=1>
lua require'completion'.on_InsertLeave()
:verbose au WinLeave
--- Autocommands ---
lualine WinLeave
* lua vim.wo.statusline=require'lualine'.statusline()
Last set from anonymous :source line 1
matchparen WinLeave
* call s:Remove_Matches()
Last set from ~/.local/share/nvim/runtime/plugin/matchparen.vim line 24
Press ENTER or type command to continue
For me, it looks like this:

You do have cusorline enabled right? :set cursorline
The cursorline doesn't move as I navigate using C-n and C-p:
map('n', '<c-n>', [[<cmd>lua require('trouble').next({skip_groups=true, jump=true})<CR>]], {noremap=true, silent=true})
map('n', '<c-p>', [[<cmd>lua require('trouble').previous({skip_groups=true, jump=true})<CR>]], {noremap=true, silent=true})
It doesn't work for me either.
As I move the cursor around over lines with diagnostics, nothing happens in the Trouble window. The diagnostic in the current line is not highlighted, and if it's out of view (e.g.: scrolling is required to see it), it remains so.
Development on the main branch is EOL.
Trouble has been rewritten and will be merged in main soon.
This issue/feature either no longer exists or has been implemented on dev.
For more info, see https://github.com/folke/trouble.nvim/tree/dev