Skip to content

Commit

Permalink
Merge pull request #327 from mattacosta/typo-fixes
Browse files Browse the repository at this point in the history
Typo fixes
  • Loading branch information
dbaeumer authored Mar 28, 2018
2 parents 088214d + 6aa4ccf commit 8d087e1
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 43 deletions.
2 changes: 1 addition & 1 deletion jsonrpc/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ function _createMessageConnection(messageReader: MessageReader, messageWriter: M

let callback: DataCallback = (message) => {
try {
// We have recevied a cancellation message. Check if the message is still in the queue
// We have received a cancellation message. Check if the message is still in the queue
// and cancel it if allowed to do so.
if (isNotificationMessage(message) && message.method === CancelNotification.type.method) {
let key = createRequestQueueKey((message.params as CancelParams).id);
Expand Down
36 changes: 18 additions & 18 deletions protocol/src/protocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export namespace DocumentFilter {
export type DocumentSelector = (string | DocumentFilter)[];

/**
* General paramters to to regsiter for an notification or to register a provider.
* General parameters to to register for an notification or to register a provider.
*/
export interface Registration {
/**
Expand Down Expand Up @@ -654,8 +654,8 @@ export interface TextDocumentSyncOptions {
*/
openClose?: boolean;
/**
* Change notificatins are sent to the server. See TextDocumentSyncKind.None, TextDocumentSyncKind.Full
* and TextDocumentSyncKindIncremental.
* Change notifications are sent to the server. See TextDocumentSyncKind.None, TextDocumentSyncKind.Full
* and TextDocumentSyncKind.Incremental.
*/
change?: TextDocumentSyncKind;
/**
Expand Down Expand Up @@ -821,7 +821,7 @@ export interface _InitializeParams {
export type InitializeParams = _InitializeParams & WorkspaceFoldersInitializeParams

/**
* The result returned from an initilize request.
* The result returned from an initialize request.
*/
export interface InitializeResult {
/**
Expand Down Expand Up @@ -864,7 +864,7 @@ export interface InitializedParams {
}

/**
* The intialized notification is send from the client to the
* The intialized notification is sent from the client to the
* server after the client is fully initialized and the server
* is allowed to send requests from the server to the client.
*/
Expand All @@ -876,8 +876,8 @@ export namespace InitializedNotification {

/**
* A shutdown request is sent from the client to the server.
* It is sent once when the client descides to shutdown the
* server. The only notification that is sent after a shudown request
* It is sent once when the client decides to shutdown the
* server. The only notification that is sent after a shutdown request
* is the exit event.
*/
export namespace ShutdownRequest {
Expand Down Expand Up @@ -993,7 +993,7 @@ export interface ShowMessageRequestParams {
}

/**
* The show message request is sent from the server to the clinet to show a message
* The show message request is sent from the server to the client to show a message
* and a set of options actions to the user.
*/
export namespace ShowMessageRequest {
Expand Down Expand Up @@ -1071,15 +1071,15 @@ export interface DidChangeTextDocumentParams {
textDocument: VersionedTextDocumentIdentifier;

/**
* The actual content changes. The content changes descibe single state changes
* The actual content changes. The content changes describe single state changes
* to the document. So if there are two content changes c1 and c2 for a document
* in state S10 then c1 move the document to S11 and c2 to S12.
*/
contentChanges: TextDocumentContentChangeEvent[];
}

/**
* Descibe options to be used when registered for text document change events.
* Describe options to be used when registered for text document change events.
*/
export interface TextDocumentChangeRegistrationOptions extends TextDocumentRegistrationOptions {
/**
Expand Down Expand Up @@ -1113,7 +1113,7 @@ export interface DidCloseTextDocumentParams {
* truth now exists on disk). As with the open notification the close notification
* is about managing the document's content. Receiving a close notification
* doesn't mean that the document was open in an editor before. A close
* notification requires a previous open notifaction to be sent.
* notification requires a previous open notification to be sent.
*/
export namespace DidCloseTextDocumentNotification {
export const type = new NotificationType<DidCloseTextDocumentParams, TextDocumentRegistrationOptions>('textDocument/didClose');
Expand All @@ -1130,7 +1130,7 @@ export interface DidSaveTextDocumentParams {

/**
* Optional the content when saved. Depends on the includeText value
* when the save notifcation was requested.
* when the save notification was requested.
*/
text?: string;
}
Expand Down Expand Up @@ -1188,7 +1188,7 @@ export namespace WillSaveTextDocumentWaitUntilRequest {

/**
* The watched files notification is sent from the client to the server when
* the client detects changes to file watched by the lanaguage client.
* the client detects changes to file watched by the language client.
*/
export namespace DidChangeWatchedFilesNotification {
export const type = new NotificationType<DidChangeWatchedFilesParams, void>('workspace/didChangeWatchedFiles');
Expand Down Expand Up @@ -1239,7 +1239,7 @@ export interface FileEvent {
}

/**
* Descibe options to be used when registered for text document change events.
* Describe options to be used when registered for text document change events.
*/
export interface DidChangeWatchedFilesRegistrationOptions {
/**
Expand Down Expand Up @@ -1373,7 +1373,7 @@ export interface CompletionParams extends TextDocumentPositionParams {
*
* The request can delay the computation of the [`detail`](#CompletionItem.detail)
* and [`documentation`](#CompletionItem.documentation) properties to the `completionItem/resolve`
* request. However, properties that are needed for the inital sorting and filtering, like `sortText`,
* request. However, properties that are needed for the initial sorting and filtering, like `sortText`,
* `filterText`, `insertText`, and `textEdit`, must not be changed during resolve.
*/
export namespace CompletionRequest {
Expand Down Expand Up @@ -1415,7 +1415,7 @@ export namespace SignatureHelpRequest {
//---- Goto Definition -------------------------------------

/**
* A request to resolve the defintion location of a symbol at a given text
* A request to resolve the definition location of a symbol at a given text
* document position. The request's parameter is of type [TextDocumentPosition]
* (#TextDocumentPosition) the response is of type [Definition](#Definition) or a
* Thenable that resolves to such.
Expand Down Expand Up @@ -1448,7 +1448,7 @@ export namespace ReferencesRequest {
/**
* Request to resolve a [DocumentHighlight](#DocumentHighlight) for a given
* text document position. The request's parameter is of type [TextDocumentPosition]
* (#TextDocumentPosition) the request reponse is of type [DocumentHighlight[]]
* (#TextDocumentPosition) the request response is of type [DocumentHighlight[]]
* (#DocumentHighlight) or a Thenable that resolves to such.
*/
export namespace DocumentHighlightRequest {
Expand Down Expand Up @@ -1729,7 +1729,7 @@ export interface ApplyWorkspaceEditParams {
}

/**
* A reponse returned from the apply workspace edit request.
* A response returned from the apply workspace edit request.
*/
export interface ApplyWorkspaceEditResponse {
/**
Expand Down
28 changes: 14 additions & 14 deletions server/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ export interface _ {
/**
* Helps tracking error message. Equal occurences of the same
* message are only stored once. This class is for example
* usefull if text documents are validated in a loop and equal
* useful if text documents are validated in a loop and equal
* error message should be folded into one.
*/
export class ErrorMessageTracker {
Expand All @@ -332,9 +332,9 @@ export class ErrorMessageTracker {
}

/**
* Send all tracked messages to the conenction's window.
* Send all tracked messages to the connection's window.
*
* @param connection The connection establised between client and server.
* @param connection The connection established between client and server.
*/
public sendErrors(connection: { window: RemoteWindow }): void {
Object.keys(this._messages).forEach(message => {
Expand Down Expand Up @@ -788,7 +788,7 @@ class RemoteClientImpl implements RemoteClient {
return this._connection.sendRequest(RegistrationRequest.type, params).then(() => {
return new BulkUnregistrationImpl(this._connection, params.registrations.map(registration => { return { id: registration.id, method: registration.method } }));
}, (_error) => {
this.connection.console.info(`Bulk registeration failed.`);
this.connection.console.info(`Bulk registration failed.`);
return Promise.reject(_error);
});
}
Expand Down Expand Up @@ -844,7 +844,7 @@ const RemoteWorkspaceImpl: new () => RemoteWorkspace = WorkspaceFoldersFeature(C

/**
* Interface to log telemetry events. The events are actually send to the client
* and the client needs to feed the event into a propert telemetry system.
* and the client needs to feed the event into a proper telemetry system.
*/
export interface Telemetry extends Remote {
/**
Expand Down Expand Up @@ -1029,14 +1029,14 @@ export interface Connection<PConsole = _, PTracer = _, PTelemetry = _, PClient =
sendNotification(method: string, ...args: any[]): void;

/**
* Installs a handler for the intialize request.
* Installs a handler for the initialize request.
*
* @param handler The initialize handler.
*/
onInitialize(handler: RequestHandler<InitializeParams, InitializeResult, InitializeError>): void;

/**
* Installs a handler for the intialized notification.
* Installs a handler for the initialized notification.
*
* @param handler The initialized handler.
*/
Expand Down Expand Up @@ -1246,7 +1246,7 @@ export interface Connection<PConsole = _, PTracer = _, PTelemetry = _, PClient =

/**
* Compute a list of [lenses](#CodeLens). This call should return as fast as possible and if
* computing the commands is expensive implementors should only return code lens objects with the
* computing the commands is expensive implementers should only return code lens objects with the
* range set and handle the resolve request.
*
* @param handler The corresponding handler.
Expand Down Expand Up @@ -1414,7 +1414,7 @@ export function combineFeatures<OConsole, OTracer, OTelemetry, OClient, OWindow,
/**
* Creates a new connection based on the processes command line arguments:
*
* @param strategy An optional connection strategy to control additinal settings
* @param strategy An optional connection strategy to control additional settings
*/
export function createConnection(strategy?: ConnectionStrategy): IConnection;

Expand All @@ -1423,7 +1423,7 @@ export function createConnection(strategy?: ConnectionStrategy): IConnection;
*
* @param inputStream The stream to read messages from.
* @param outputStream The stream to write messages to.
* @param strategy An optional connection strategy to control additinal settings
* @param strategy An optional connection strategy to control additional settings
* @return a [connection](#IConnection)
*/
export function createConnection(inputStream: NodeJS.ReadableStream, outputStream: NodeJS.WritableStream, strategy?: ConnectionStrategy): IConnection;
Expand All @@ -1433,15 +1433,15 @@ export function createConnection(inputStream: NodeJS.ReadableStream, outputStrea
*
* @param reader The message reader to read messages from.
* @param writer The message writer to write message to.
* @param strategy An optional connection strategy to control additinal settings
* @param strategy An optional connection strategy to control additional settings
*/
export function createConnection(reader: MessageReader, writer: MessageWriter, strategy?: ConnectionStrategy): IConnection;

/**
* Creates a new connection based on the processes command line arguments. The new connection surfaces proposed API
*
* @param factories: the factories to use to implement the proposed API
* @param strategy An optional connection strategy to control additinal settings
* @param strategy An optional connection strategy to control additional settings
*/
export function createConnection<PConsole = _, PTracer = _, PTelemetry = _, PClient = _, PWindow = _, PWorkspace = _>(
factories: Features<PConsole, PTracer, PTelemetry, PClient, PWindow, PWorkspace>,
Expand All @@ -1453,7 +1453,7 @@ export function createConnection<PConsole = _, PTracer = _, PTelemetry = _, PCli
*
* @param inputStream The stream to read messages from.
* @param outputStream The stream to write messages to.
* @param strategy An optional connection strategy to control additinal settings
* @param strategy An optional connection strategy to control additional settings
* @return a [connection](#IConnection)
*/
export function createConnection<PConsole = _, PTracer = _, PTelemetry = _, PClient = _, PWindow = _, PWorkspace = _>(
Expand All @@ -1466,7 +1466,7 @@ export function createConnection<PConsole = _, PTracer = _, PTelemetry = _, PCli
*
* @param reader The message reader to read messages from.
* @param writer The message writer to write message to.
* @param strategy An optional connection strategy to control additinal settings
* @param strategy An optional connection strategy to control additional settings
*/
export function createConnection<PConsole = _, PTracer = _, PTelemetry = _, PClient = _, PWindow = _, PWorkspace = _>(
factories: Features<PConsole, PTracer, PTelemetry, PClient, PWindow, PWorkspace>,
Expand Down
20 changes: 10 additions & 10 deletions types/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* is 1 and the character offset of b is 3 since `𐐀` is represented using two code
* units in UTF-16.
*
* Positions are line end character agnostic. So you can not specifiy a position that
* Positions are line end character agnostic. So you can not specify a position that
* denotes `\r|\n` or `\n|` where `|` represents the character offset.
*/
export interface Position {
Expand Down Expand Up @@ -151,7 +151,7 @@ export namespace Location {
}

/**
* The diagnostic's serverity.
* The diagnostic's severity.
*/
export namespace DiagnosticSeverity {
/**
Expand Down Expand Up @@ -822,7 +822,7 @@ export interface CompletionItem {
documentation?: string | MarkupContent;

/**
* A string that shoud be used when comparing this item
* A string that should be used when comparing this item
* with other items. When `falsy` the [label](#CompletionItem.label)
* is used.
*/
Expand Down Expand Up @@ -945,7 +945,7 @@ export namespace CompletionList {
/**
* MarkedString can be used to render human readable text. It is either a markdown string
* or a code-block that provides a language and a code snippet. The language identifier
* is sematically equal to the optional language identifier in fenced code blocks in GitHub
* is semantically equal to the optional language identifier in fenced code blocks in GitHub
* issues. See https://help.github.com/articles/creating-and-highlighting-code-blocks/#syntax-highlighting
*
* The pair of a language and a value is an equivalent to markdown:
Expand Down Expand Up @@ -1108,7 +1108,7 @@ export interface ReferenceContext {
*/
export namespace DocumentHighlightKind {
/**
* A textual occurrance.
* A textual occurrence.
*/
export const Text: 1 = 1;

Expand Down Expand Up @@ -1213,7 +1213,7 @@ export interface SymbolInformation {
* The location of this symbol. The location's range is used by a tool
* to reveal the location in the editor. If the symbol is selected in the
* tool the range's start information is used to position the cursor. So
* the range usually spwans more then the actual symbol's name and does
* the range usually spans more than the actual symbol's name and does
* normally include thinks like visibility modifiers.
*
* The range doesn't have to denote a node range in the sense of a abstract
Expand All @@ -1224,7 +1224,7 @@ export interface SymbolInformation {

/**
* The name of the symbol containing this symbol. This information is for
* user interface purposes (e.g. to render a qaulifier in the user interface
* user interface purposes (e.g. to render a qualifier in the user interface
* if necessary). It can't be used to re-infer a hierarchy for the document
* symbols.
*/
Expand All @@ -1239,7 +1239,7 @@ export namespace SymbolInformation {
* @param kind The kind of the symbol.
* @param range The range of the location of the symbol.
* @param uri The resource of the location of symbol, defaults to the current document.
* @param containerName The name of the symbol containg the symbol.
* @param containerName The name of the symbol containing the symbol.
*/
export function create(name: string, kind: SymbolKind, range: Range, uri?: string, containerName?: string): SymbolInformation {
let result: SymbolInformation = {
Expand Down Expand Up @@ -1434,7 +1434,7 @@ export namespace DocumentLink {
export const EOL: string[] = ['\n', '\r\n', '\r'];

/**
* A simple text document. Not to be implemenented.
* A simple text document. Not to be implemented.
*/
export interface TextDocument {

Expand Down Expand Up @@ -1467,7 +1467,7 @@ export interface TextDocument {
* providing a range.
*
* @param range (optional) An range within the document to return.
* If no range is passed, the full conetnt is returned.
* If no range is passed, the full content is returned.
* Invalid range positions are adjusted as described in [Position.line](#Position.line)
* and [Position.character](#Position.character).
* If the start range position is greater than the end range position,
Expand Down

0 comments on commit 8d087e1

Please sign in to comment.