Closed IndianBoy42 closed 4 months ago
This is not really something that would be easy to implement. What you see in trouble, are rendered templates that can be basically anything, so it's almost impossible to correctly link that back to the original file.
What you can do instead, is use vertical splits for the preview (see examples) and set opts.preview.scratch = false
.
That way, you can make edits in the preview window.
Not the same, I know, but the closest you can get to what you want.
Did you check the docs?
Is your feature request related to a problem? Please describe.
This is a workflow I really like from using
replacer.nvim
where the quickfix list is turned into a buffer that I can edit and when I save the lines in the original buffers/files are edited. This is really powerful because you can then seamlessly use all the editing tricks and workflows you have in a normal bufferDescribe the solution you'd like
This probably shouldn't be too easy to activate, like needing
<C-e>
to make the buffer editable, at which point preview and some other features are turned off and the user can start editing the buffer as normal. OnBufWritePost
or perhaps a separate keybinding these edits are synced back to the buffers. Of course this is only relevant for certain lists that actually have such a mapping to certain positions in files. For diagnostics maybe editable mode should add in the line that the diagnostic is pointing to so it can be edited.Describe alternatives you've considered
Currently trouble is just a navigation plugin so we have to jump between each position and do whatever actions and edits we want.
Additional context
No response