microsoft / inshellisense

IDE style command line auto complete
MIT License
8.38k stars 187 forks source link

fix: make keys map closer to normal IDE intellisense #70

Closed theKnightsOfRohan closed 9 months ago

theKnightsOfRohan commented 10 months ago

Addresses issue #59

Changes

This pull request introduces the following changes:

  1. Added a showSuggestions property to the ui-root component. This property controls the visibility of the suggestions dropdown in the UI.
  2. Added a setShowSuggestions prop to the Input and Suggestions components. This prop is a function that can be used to programmatically control the visibility of the suggestions dropdown.
  3. Added a showSuggestions prop to the Suggestions component, to better control when the autocompletion list should be shown.
  4. Changed key actions. Now, the return key autocompletes terms when the suggestions dropdown is visible, and submits the command when the dropdown is invisible. Also stopped showing the dropdown when the left arrow key or esc key is pressed, to fit with IDE intellisense.

Testing

Please ensure that the changes work as expected and that the suggestions dropdown can be shown and hidden by the intended keys.

Reviewers

Please review this pull request and provide feedback.

theKnightsOfRohan commented 10 months ago

@microsoft-github-policy-service agree

cpendery commented 9 months ago

Closing this as the keys have diverged quite a bit since this PR was opened. I'll be documenting the new key structure soon