public Task TextChanged(FilePath fileName, int version, TextChangeEventArgs e, TextEditor editor)
        {
            Runtime.AssertMainThread();

            if (!IsStarted)
            {
                return(Task.FromResult(0));
            }

            if (!IsDocumentSyncSupported)
            {
                Log("Document sync not supported by server for '{0}'. File: '{1}'", Methods.TextDocumentDidChangeName, fileName);
                return(Task.FromResult(0));
            }

            Log("Sending '{0}'. File: '{1}'", Methods.TextDocumentDidChangeName, fileName);

            var message = new DidChangeTextDocumentParams {
                TextDocument   = TextDocumentIdentifierFactory.Create(fileName, version),
                ContentChanges = e.CreateTextDocumentContentChangeEvents(editor, IsDocumentSyncFull)
                                 .ToArray()
            };

            return(jsonRpc.NotifyWithParameterObjectAsync(Methods.TextDocumentDidChange, message));
        }
 IEnumerable <TextDocumentContentChangeEvent> CreateTextChangeEvents(bool full)
 {
     return(textChangeEventArgs.CreateTextDocumentContentChangeEvents(editor, full));
 }