EasyClangComplete icon indicating copy to clipboard operation
EasyClangComplete copied to clipboard

Add Fixits

Open niosus opened this issue 9 years ago • 8 comments

We already have everything needed to show fixits. We just need to do it.

niosus avatar Mar 14 '17 10:03 niosus

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

simia avatar Mar 16 '17 15:03 simia

Can't say anything about it now, sorry. Will probably look at it tomorrow or on the weekend.

niosus avatar Mar 16 '17 15:03 niosus

Ok. I think I've got it going. False alarm :)

simia avatar Mar 16 '17 15:03 simia

:+1: as always, if you manage to have a working prototype - PRs welcome. Also a [wip] PRs for further discussion.

niosus avatar Mar 16 '17 15:03 niosus

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.

niosus avatar Apr 23 '17 22:04 niosus

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'.

kjteske avatar Apr 24 '17 12:04 kjteske

Added PR #253 with minimal working prototype

riazanovskiy avatar Apr 25 '17 15:04 riazanovskiy

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.

niosus avatar Oct 25 '17 09:10 niosus