public override bool IsInsertionTrigger( SourceText text, int characterPosition, OptionSet options ) { // Bring up on space or at the start of a word, or after a ( or [. // // Note: we don't want to bring this up after traditional enum operators like & or |. // That's because we don't like the experience where the enum appears directly after the // operator. Instead, the user normally types <space> and we will bring up the list // then. var ch = text[characterPosition]; return(ch == ' ' || ch == '[' || ch == '(' || ch == '~' || ( options.GetOption( CompletionOptions.TriggerOnTypingLetters2, LanguageNames.CSharp ) && CompletionUtilities.IsStartingNewWord(text, characterPosition) )); }
internal static bool IsTriggerAfterSpaceOrStartOfWordCharacter(SourceText text, int characterPosition, OptionSet options) { // Bring up on space or at the start of a word. var ch = text[characterPosition]; return(ch == ' ' || (CompletionUtilities.IsStartingNewWord(text, characterPosition) && options.GetOption(CompletionOptions.TriggerOnTypingLetters, LanguageNames.CSharp))); }
internal override bool IsInsertionTrigger(SourceText text, int characterPosition, OptionSet options) { var ch = text[characterPosition]; return(ch == ' ' || (CompletionUtilities.IsStartingNewWord(text, characterPosition) && options.GetOption(CompletionOptions.TriggerOnTypingLetters, LanguageNames.CSharp))); }
protected override bool ShouldTriggerAfterQuotes(SourceText text, int insertedCharacterPosition) => CompletionUtilities.IsStartingNewWord(text, insertedCharacterPosition);
public override bool IsInsertionTrigger(SourceText text, int characterPosition, CompletionOptions options) => text[characterPosition] == ' ' || options.TriggerOnTypingLetters && CompletionUtilities.IsStartingNewWord(text, characterPosition);