neo-tree.nvim
neo-tree.nvim copied to clipboard
Feature request: jump to next file with diagnostic
Hey, thanks for the awesome plugin!
Wanting to suggest than neotree has the option to have a shortcut to jump to next/previous file with LSP diagnostics in it.
I think this might cause some speed issues on large projects(possibly consisting of different codes of different languages). Here are some of the reasons:
- The LSP diagnostics sign only appears when the LSP client has been attached to that file/buffer. This means that these LSP clients are lazy-loaded. (see my demo below)
- From my understanding of your purpose, you want to jump to those can-be-optimized lines in your project, including files that you haven't opened. If this guess is correct, then the feature you proposed would not be efficiently achieved.
- But, it might be harmless on small projects. So maybe point 2. can be resolved by providing options to put limitations on pre-loading(those LSP clients will be started to do their diagnostics jobs), nested level to explore, maximum files to explore, etc.
If these are not the problem, then I'm also interested in this feature! @nullishamy
In the demo, those three H signs are shown only after the LSP client started and those files under my cursor are loaded into some (not-listed) buffers.
https://user-images.githubusercontent.com/24765272/192690668-48b4378a-f226-4d2f-ab2b-5d0e6d191ca1.mov
I think the best solution is allowing it to be customised. Set as threshold for when lazy loading kicks in (so you dont open millions of files) and just lazy load the rest. The point is being able to jump to existing diagnostics (ie ones vim already has), so not seeing every diagnostic in the entire project isnt a huge deal really. In any case, I dont see users of a tree wanting to search for all the diagnostics, if you wanted something like that, trouble.nvim is probably better.