trouble.nvim icon indicating copy to clipboard operation
trouble.nvim copied to clipboard

Is there a way to disable folding?

Open sbromberger opened this issue 4 years ago • 11 comments

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.

sbromberger avatar Jun 13 '21 15:06 sbromberger

(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.)

sbromberger avatar Jun 13 '21 15:06 sbromberger

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

folke avatar Jun 17 '21 10:06 folke

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?

sbromberger avatar Jun 17 '21 14:06 sbromberger

It does that already, no? Do you have any code that disables the cursorline for inactive windows?

folke avatar Jun 17 '21 16:06 folke

Do you have any code that disables the cursorline for inactive windows?

I don't think so. How can I check?

sbromberger avatar Jun 17 '21 16:06 sbromberger

run :verbose au InsertLeave and check for something that does set nocursorline

folke avatar Jun 17 '21 16:06 folke

sorry, probably :verbose au WinLeave

folke avatar Jun 17 '21 16:06 folke

: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

sbromberger avatar Jun 17 '21 16:06 sbromberger

For me, it looks like this: image

You do have cusorline enabled right? :set cursorline

folke avatar Jun 17 '21 16:06 folke

The cursorline doesn't move as I navigate using C-n and C-p:

screenshot
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})

sbromberger avatar Jun 18 '21 23:06 sbromberger

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.

WhyNotHugo avatar Jul 20 '21 12:07 WhyNotHugo

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

folke avatar Mar 29 '24 07:03 folke