ISuggestionGenerator.cs 744 B

12345678910111213141516
  1. #nullable disable
  2. namespace Terminal.Gui.Views;
  3. /// <summary>Generates autocomplete <see cref="Suggestion"/> based on a given cursor location within a string</summary>
  4. public interface ISuggestionGenerator
  5. {
  6. /// <summary>Generates autocomplete <see cref="Suggestion"/> based on a given <paramref name="context"/></summary>
  7. IEnumerable<Suggestion> GenerateSuggestions (AutocompleteContext context);
  8. /// <summary>
  9. /// Returns <see langword="true"/> if <paramref name="text"/> is a character that would continue autocomplete
  10. /// suggesting. Returns <see langword="false"/> if it is a 'breaking' character (i.e. terminating current word
  11. /// boundary)
  12. /// </summary>
  13. bool IsWordChar (string text);
  14. }