Fixit icon indicating copy to clipboard operation
Fixit copied to clipboard

Integrate Fixit into a VSCode plugin

Open jimmylai opened this issue 5 years ago • 1 comments

Integrate Fixit into a VSCode plugin (and potentially any other IDE), so developer can easily install it and use it on VSCode.

Fixit can be run automatically when developers save source file updates and show warning inline with wavy underline or lightbulb UIs.

Then developers can click on the UI or press some shortcut to apply autofix.

Some helper is provided to make this easy to implement, e.g. lint_file returns a list of violation reports (BaseLintRuleReport) and provides patch property when autofix is available.

https://github.com/Instagram/Fixit/blob/master/fixit/rule_lint_engine.py#L54

jimmylai avatar Sep 07 '20 18:09 jimmylai

Here's a rather janky way to get VSCode diagnostics on load/save: https://github.com/llllvvuu/efm-tool-definitions.yaml/blob/cb90f12516a27a8e1820600afe94229c04bb5c19/tool-definitions.yaml#L42-L55

The above becomes lint-as-you-type if https://github.com/Instagram/Fixit/pull/388 is merged.

That leaves the remaining task of supporting Code Actions, which requires implementing LSP: #387 (EDIT: PR up)

llllvvuu avatar Sep 06 '23 14:09 llllvvuu