flutter-tools.nvim icon indicating copy to clipboard operation
flutter-tools.nvim copied to clipboard

Hide Flutter dev log from buffers list.

Open divan opened this issue 2 years ago • 3 comments

Flutter dev log buffer is appearing in the buffer list with a filename 'FLUTTER_DEV_LOG'. It's handy to keep that buffer visible (in a split window), but it causes problems when cycling through buffers or resizing it.

This PR sets 'buflisted' property to false, so the buffer is not listed.

This will probably require implementing some kind of log window toggling (discussed in https://github.com/akinsho/flutter-tools.nvim/issues/84).

In general, this echoes abovementioned issue in a way to bring more consistency between log and outline windows for this plugin.

divan avatar May 22 '22 18:05 divan

@divan thanks for the PR, so this is actually an intentional choice to keep it visible in the list, primarily because people regularly do things like copying from the log or just needing it to be visible to refer back to. I think as you say if there was a consistent way to toggle it reliably in all cases then it wouldn't be needed, but it feels like this should come after that. If this is taken away now without a toggle function, users will not be able to find the buffer without a bunch of faff.

akinsho avatar May 22 '22 18:05 akinsho

@akinsho totally agree. I'll try to work a bit on toggling. So far my understanding is that split and tabs modes are quite different. Split mode should be identical to outline (UX-wise). Tab mode is completely different. If that's correct, than the challenge is to distinguish those to modes and apply different set of buffer configurations.

divan avatar May 22 '22 19:05 divan

@divan I would actually approach more simply and regardless of a user's configuration if they are toggling then it will be a split, but the command should be named as such e.g. toggle split. I would basically open a split window and track the ID and so if they hit toggle again and the window is still open in any tabpage then close it. If it isn't open in any tabpage then open it in the current one. I guess you'll also need to keep track of the buffer number which should be consistent regardless of the tab, so you can open it when toggling it open

akinsho avatar May 22 '22 20:05 akinsho