public IEnumerable <CompletionResult> CompleteArgument(string commandName, string parameterName, string wordToComplete, CommandAst commandAst, IDictionary fakeBoundParameters)
        {
            var organizer = new SnippetOrganizer(SnippyOptions.Instance.Value, FileAssociations.Instance.Value);
            var languages = organizer.GetUniqueLanguages();

            return(string.IsNullOrEmpty(wordToComplete)
                ? languages.Select(x => new CompletionResult(x))
                : languages.Where(x => x.StartsWith(wordToComplete)).Select(x => new CompletionResult(x)));
        }
Exemple #2
0
        public IEnumerable <CompletionResult> CompleteArgument(string commandName, string parameterName, string wordToComplete, CommandAst commandAst, IDictionary fakeBoundParameters)
        {
            var organizer = new SnippetOrganizer(SnippyOptions.Instance.Value, FileAssociations.Instance.Value);
            var files     = organizer.GetAllWorkspaceFiles().Select(Path.GetFileNameWithoutExtension);

            return(string.IsNullOrEmpty(wordToComplete)
                ? files.Select(x => new CompletionResult(x))
                : files.Where(x => x.StartsWith(wordToComplete)).Select(x => new CompletionResult(x)));
        }