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.Stark))); }
internal 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.TriggerOnTypingLetters, LanguageNames.Stark) && CompletionUtilities.IsStartingNewWord(text, characterPosition))); }