Add Fixits
We already have everything needed to show fixits. We just need to do it.
Had a quick look at it. For libclang3.8 it doesn't look good. cindex throws erros:( File "/home/tomasz/.config/sublime-text-3/Packages/EasyClangComplete/plugin/clang/cindex38.py", line 366, in getitem
Can't say anything about it now, sorry. Will probably look at it tomorrow or on the weekend.
Ok. I think I've got it going. False alarm :)
:+1: as always, if you manage to have a working prototype - PRs welcome. Also a [wip] PRs for further discussion.
To kick in some more discussion: I imagine it in the following way:
- errors are shown by linter.
- user can use Ctrl+Shift+P to fire up one of the commands:
- apply all fixits for file
- apply next fixit for file
The first one modifies the file by changing all the places in the code that are found in fixits, the second one allows to pick the fixits that the user wants.
Maybe instead (or in addition to) 'next fixit', a command that pops up a menu with a list of fixits in the current file, and selecting that line applies the fixit? Similar to how the Git plugin shows a list of branches for the 'Git: Change Branch' command. For convenience, perhaps the first option in the list is 'Apply all fixits'.
Added PR #253 with minimal working prototype
After looking at the PR from @riazanovskiy (thanks for submitting!) and iterating a bit on top of it, I feel like it should not be part of this plugins functionality. I will close this issue and move it to backlog to streamline my attention on other issues.