Part of #62110
Use the more generic name as suggested in https://github.com/Dart-Code/Dart-Code/issues/1393. This makes the intent of the field more clear and also allows us to extend the concept of preferred code actions to refactorings and other classes of code actions
Experimentally also allows a `preferred` value for `apply` when configuring code aciton keyboard shortcuts. This applies the preferred code action returned from the list of code actions returned
Part of #62110
- Adds a new field `canAutoApply` to code actions. This field indicates that a code action can be applied without additional user input. For quick fixes, this should be set if the fix properly addresses the error
- Enable auto fixes for TS spelling errors
- Added a `editor.action.autoFix` command to triggers auto fixes at the current cursor position
This new call works as a type guard and can help avoid writing double negations
Avoid either call in cases where we were iterating over the possibly undefined value. Use `|| []` for these
Introduces the concept of a re-trigger character to the signature help provider. This is a seperate set of characters that are registered with the provider. Typing a retrigger character fires a new signature help request if signature help is already showing.
#54972
We compile using the alwaysStrict flag so these directives are not needed
This part removes most `use strict` directives that are right after the file header
* Initial work on signature help context
Fixes#54972
Adds `SignatureHelpContext`. This tells providers why signature help was requested
TODO:
- [ ] Better understand semantics of retrigger. Should `retrigger` be an flag instead of a `triggerReason`?
- [ ] Fix skipped test
- [ ] Add more tests for trigger reasons / trigger characters
* Fix unit test
* Make sure we retrigger sig help if it is already showing
* Add test for dismiss and re-invoke
* Extract some constants
* Extract createMockEditor
* Add extension logging when returned code action will be dropped
Fixes#54803
Adds a loggin warning when a code action provider returns code actions that will be dropped. Warn in the the following cases:
- A provider returns code actions (not commands)
- And a specific code action type is requested.
- And the returned code actions either don't set kind or are of the wrong kind
* Use log service
* Include extension id in warning