Closed yucombinator closed 3 years ago
Interesting, we don't have a corresponding facility in our IDE integration. When do you find this useful? HH_FIXME
is usually a code smell.
It comes in handy as we have a fair number of legacy code that needs to be FIXME'd when we need to upgrade hHVM versions, and eliminating the FIXME's would be too big in scope and will be dealt with later.
Another Code Action that would be useful to add (that I'm looking into on my free time), is the possibility of creating auto complete suggestions for unbound symbol names and leveraging hh_client --search
. This could be useful for example, to create suggest namespace auto-completion. Would these be a use for that as well?
For the upgrade case, would bin/hhast-migrate --add-fixmes
be a better approach? It's also strongly discouraged, but lets you do the whole codebase in one go, and avoids promoting FIXMEs via IDE features
Regarding unbound symbol names, that sounds interesting! If you fancy opening a separate issue, I'd love to learn more.
Sure I'll make an issue once I get a working prototype or something going 👍
Add a code action to allow hack errors to be quickly FIXME'ed.
The code for the error suppression quickfix was already part of the plugin for legacy (non-LSP) mode, but it stopped working in LSP mdoe as the hack LSP server does not support quick fixes, so this PR restores the old behavior by adding the code actions.