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

feature: Interaction with oil.nvim buffers

Open Rubenduburck opened this issue 1 year ago • 7 comments

Did you check the docs?

  • [X] I have read all the trouble.nvim docs

Is your feature request related to a problem? Please describe.

When opening any trouble panel with results, if I leave the buffer to go to an oil buffer (file explorer) and then go into the still loaded trouble panel and attempt to load a preview for any of the items, Trouble fails with error trouble/view/preview.lua:91: attempt to index field 'preview' (a nil value). These errors continue every 100ms as long as Trouble is running.

Describe the solution you'd like

Would like the Trouble panel to load the preview as it does normally

Describe alternatives you've considered

The only way around this is to make sure not to enter a Trouble panel whenever in oil.nvim.

Additional context

No response

Rubenduburck avatar Mar 29 '24 13:03 Rubenduburck

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 fixed/implemented on dev.

For more info, see https://github.com/folke/trouble.nvim/tree/dev

folke avatar Mar 29 '24 13:03 folke

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 fixed/implemented on dev.

For more info, see https://github.com/folke/trouble.nvim/tree/dev

Forgot to mention, I'm on dev. Did not have this problem before dev.

Rubenduburck avatar Mar 29 '24 15:03 Rubenduburck

trouble/view/preview.lua does not exist on dev. So you're not on dev or at least didnt update with lazy or your package manager

folke avatar Mar 29 '24 16:03 folke

trouble/view/preview.lua does not exist on dev. So you're not on dev or at least didnt update with lazy or your package manager

isn't it here?

Maybe I'm missing something

Rubenduburck avatar Mar 30 '24 07:03 Rubenduburck

Yes, sorry, didnt check that good enough :)

You probably only have an oil window and a troubke window? No windows with regular buffers?

That's what's causing the error.

I'll have to see how to properly deal with this.

I'm leaving on a vacation in half an hour though, so will be for in a week or two.

folke avatar Mar 30 '24 09:03 folke

Yes, sorry, didnt check that good enough :)

You probably only have an oil window and a troubke window? No windows with regular buffers?

That's what's causing the error.

I'll have to see how to properly deal with this.

I'm leaving on a vacation in half an hour though, so will be for in a week or two.

Yeah that's exactly right, trouble window + oil window.

Enjoy!

Rubenduburck avatar Mar 30 '24 09:03 Rubenduburck

+1, would love to see this fixed :)

maxbol avatar May 03 '24 08:05 maxbol