dense-analysis / ale

Check syntax in Vim/Neovim asynchronously and fix files, with Language Server Protocol (LSP) support
BSD 2-Clause "Simplified" License
13.56k stars 1.44k forks source link

Could fixers support a model of floating optional suggestions? #3084

Open dbarnett opened 4 years ago

dbarnett commented 4 years ago

It looks like ALE fixers work on a model of handing off to a tool to apply a bunch of modifications to the buffer in-place vs. offering available fixes you could selectively apply. If so, any interest in supporting a model of floating optional suggestions you could browse through and pick-and-choose any you want to apply, along the lines of the little floating lightbulb tips many IDEs offer?

dbarnett commented 4 years ago

I ask because I see some areas of overlap between this and my vim-codefmt plugin for format-on-save etc., and I'm considering whether I could improve an existing plugin instead of making something new.

If there could be more of an explicit description of a set of fixes to be applied, users could e.g. whitelist categories of fixes to apply automatically like b:auto_fix_on_save = ['sort-imports', 'indent', 'wrap-long-lines'] and have more of an ambient "code intelligence" experience.