Skip to content

Commit

Permalink
fix: typos found by github.com/crate-ci/typos (#3146)
Browse files Browse the repository at this point in the history
  • Loading branch information
fannheyward authored Jun 16, 2021
1 parent 70a7903 commit 179ca72
Show file tree
Hide file tree
Showing 12 changed files with 36 additions and 36 deletions.
2 changes: 1 addition & 1 deletion autoload/coc/compat.vim
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ function! coc#compat#matchaddgroups(winid, groups) abort
endif
endfunction

" remove keymap for specfic buffer
" remove keymap for specific buffer
function! coc#compat#buf_del_keymap(bufnr, mode, lhs) abort
if !bufloaded(a:bufnr)
return
Expand Down
2 changes: 1 addition & 1 deletion data/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@
},
"suggest.keepCompleteopt": {
"type": "boolean",
"description": "When enabled, completeopt is not overriden, auto completion will be disabled if completeopt doesn't have noinsert and noselect.",
"description": "When enabled, completeopt is not overridden, auto completion will be disabled if completeopt doesn't have noinsert and noselect.",
"default": false
},
"suggest.lowPrioritySourceLimit": {
Expand Down
2 changes: 1 addition & 1 deletion src/handler/colors/colorBuffer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export default class ColorBuffer implements SyncItem {
this.buffer.clearNamespace('color')
}

public hasColorAtPostion(position: Position): boolean {
public hasColorAtPosition(position: Position): boolean {
let { colors } = this
return colors.some(o => positionInRange(position, o.range) == 0)
}
Expand Down
10 changes: 5 additions & 5 deletions src/handler/colors/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default class Colors {
}

public async pickPresentation(): Promise<void> {
let info = await this.currentColorInfomation()
let info = await this.currentColorInformation()
if (!info) return window.showMessage('Color not found at current position', 'warning')
let document = await workspace.document
let tokenSource = new CancellationTokenSource()
Expand All @@ -64,7 +64,7 @@ export default class Colors {
}

public async pickColor(): Promise<void> {
let info = await this.currentColorInfomation()
let info = await this.currentColorInformation()
if (!info) return window.showMessage('Color not found at current position', 'warning')
let { color } = info
let colorArr = [(color.red * 255).toFixed(0), (color.green * 255).toFixed(0), (color.blue * 255).toFixed(0)]
Expand Down Expand Up @@ -106,10 +106,10 @@ export default class Colors {
return highlighter.hasColor()
}

public hasColorAtPostion(bufnr: number, position: Position): boolean {
public hasColorAtPosition(bufnr: number, position: Position): boolean {
let highlighter = this.highlighters.getItem(bufnr)
if (!highlighter) return false
return highlighter.hasColorAtPostion(position)
return highlighter.hasColorAtPosition(position)
}

public highlightAll(): void {
Expand All @@ -124,7 +124,7 @@ export default class Colors {
await highlighter.doHighlight()
}

private async currentColorInfomation(): Promise<ColorInformation | null> {
private async currentColorInformation(): Promise<ColorInformation | null> {
let bufnr = await this.nvim.call('bufnr', '%')
let highlighter = this.highlighters.getItem(bufnr)
if (!highlighter) return null
Expand Down
6 changes: 3 additions & 3 deletions src/language-client/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,7 @@ export interface StaticFeature {

/**
* Initialize the feature. This method is called on a feature instance
* when the client has successfully received the initalize request from
* when the client has successfully received the initialize request from
* the server and before the client sends the initialized notification
* to the server.
*
Expand All @@ -896,7 +896,7 @@ export interface StaticFeature {

/**
* Called when the client is stopped to dispose this feature. Usually a feature
* unregisters listeners registerd hooked up with the VS Code extension host.
* unregisters listeners registered hooked up with the VS Code extension host.
*/
dispose(): void
}
Expand Down Expand Up @@ -953,7 +953,7 @@ export interface DynamicFeature<RO> {

/**
* Called when the client is stopped to dispose this feature. Usually a feature
* unregisters listeners registerd hooked up with the VS Code extension host.
* unregisters listeners registered hooked up with the VS Code extension host.
*/
dispose(): void
}
Expand Down
2 changes: 1 addition & 1 deletion src/list/source/symbols.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default class Symbols extends LocationList {
}
let symbols = await languages.getWorkspaceSymbols(input, token)
if (!symbols) {
throw new Error('No workspace symbols provider registed')
throw new Error('No workspace symbols provider registered')
}
let config = this.getConfig()
let excludes = config.get<string[]>('excludes', [])
Expand Down
2 changes: 1 addition & 1 deletion src/provider/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export type ProviderResult<T> =
* Providers can delay the computation of the [`detail`](#CompletionItem.detail)
* and [`documentation`](#CompletionItem.documentation) properties by implementing the
* [`resolveCompletionItem`](#CompletionItemProvider.resolveCompletionItem)-function. However, properties that
* are needed for the inital sorting and filtering, like `sortText`, `filterText`, `insertText`, and `range`, must
* are needed for the initial sorting and filtering, like `sortText`, `filterText`, `insertText`, and `range`, must
* not be changed during resolve.
*
* Providers are asked for completions either explicitly by a user gesture or -depending on the configuration-
Expand Down
4 changes: 2 additions & 2 deletions src/snippets/variableResolve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class SnippetVariableResolver implements VariableResolver {
})
}

private async resovleValue(name: string): Promise<string | undefined> {
private async resolveValue(name: string): Promise<string | undefined> {
let { nvim } = window
if (['TM_FILENAME', 'TM_FILENAME_BASE', 'TM_DIRECTORY', 'TM_FILEPATH'].includes(name)) {
let filepath = await nvim.eval('expand("%:p")') as string
Expand Down Expand Up @@ -80,7 +80,7 @@ export class SnippetVariableResolver implements VariableResolver {
let resolved = this._variableToValue[name]
if (resolved != null) return resolved.toString()
// resolve value from vim
let value = await this.resovleValue(name)
let value = await this.resolveValue(name)
if (value) return value
// use default value when resolved is undefined
if (variable.children && variable.children.length) {
Expand Down
4 changes: 2 additions & 2 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1378,7 +1378,7 @@ export interface ISource {
triggerCharacters?: string[]
// should only be used when trigger match.
triggerOnly?: boolean
// regex to detect trigger completetion, ignored when triggerCharacters exists.
// regex to detect trigger completion, ignored when triggerCharacters exists.
triggerPatterns?: RegExp[]
disableSyntaxes?: string[]
isSnippet?: boolean
Expand Down Expand Up @@ -1416,7 +1416,7 @@ export interface ISource {
*/
shouldComplete?(opt: CompleteOption): Promise<boolean>
/**
* Do completetion
* Do completion
*
* @public
* @param {CompleteOption} opt
Expand Down
2 changes: 1 addition & 1 deletion src/window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ class Window {
* Get current cursor character offset in document,
* length of line break would always be 1.
*
* @returns Charactor offset.
* @returns Character offset.
*/
public async getOffset(): Promise<number> {
return await this.nvim.call('coc#util#get_offset') as number
Expand Down
2 changes: 1 addition & 1 deletion src/workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1018,7 +1018,7 @@ export class Workspace implements IWorkspace {
}

/**
* Resovle module from yarn or npm.
* Resolve module from yarn or npm.
*/
public async resolveModule(name: string): Promise<string> {
return await this.resolver.resolveModule(name)
Expand Down
34 changes: 17 additions & 17 deletions typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1014,7 +1014,7 @@ declare module 'coc.nvim' {
insertText?: string
/**
* The format of the insert text. The format applies to both the `insertText` property
* and the `newText` property of a provided `textEdit`. If ommitted defaults to
* and the `newText` property of a provided `textEdit`. If omitted defaults to
* `InsertTextFormat.PlainText`.
*/
insertTextFormat?: InsertTextFormat
Expand Down Expand Up @@ -2026,7 +2026,7 @@ declare module 'coc.nvim' {
createTabpage(id: number): Tabpage

/**
* Stop send subsquent notifications.
* Stop send subsequent notifications.
*/
pauseNotification(): void

Expand Down Expand Up @@ -2926,7 +2926,7 @@ declare module 'coc.nvim' {
* Providers can delay the computation of the [`detail`](#CompletionItem.detail)
* and [`documentation`](#CompletionItem.documentation) properties by implementing the
* [`resolveCompletionItem`](#CompletionItemProvider.resolveCompletionItem)-function. However, properties that
* are needed for the inital sorting and filtering, like `sortText`, `filterText`, `insertText`, and `range`, must
* are needed for the initial sorting and filtering, like `sortText`, `filterText`, `insertText`, and `range`, must
* not be changed during resolve.
*
* Providers are asked for completions either explicitly by a user gesture or -depending on the configuration-
Expand Down Expand Up @@ -3835,7 +3835,7 @@ declare module 'coc.nvim' {
*/
defaultAction: string
/**
* Registed actions.
* Registered actions.
*/
readonly actions: ListAction[]
/**
Expand Down Expand Up @@ -4736,7 +4736,7 @@ declare module 'coc.nvim' {
*/
triggerOnly?: boolean
triggerCharacters?: string[]
// regex to detect trigger completetion, ignored when triggerCharacters exists.
// regex to detect trigger completion, ignored when triggerCharacters exists.
triggerPatterns?: RegExp[]
disableSyntaxes?: string[]
filepath?: string
Expand All @@ -4763,7 +4763,7 @@ declare module 'coc.nvim' {
shouldComplete?(opt: CompleteOption): Promise<boolean>

/**
* Run completetion
* Run completion
*
* @public
* @param {CompleteOption} opt
Expand Down Expand Up @@ -4796,7 +4796,7 @@ declare module 'coc.nvim' {

export namespace sources {
/**
* Names of registed sources.
* Names of registered sources.
*/
export const names: ReadonlyArray<string>
export const sources: ReadonlyArray<ISource>
Expand Down Expand Up @@ -5195,7 +5195,7 @@ declare module 'coc.nvim' {
*/
readonly content: string
/**
* Coverted filetype.
* Converted filetype.
*/
readonly filetype: string
readonly uri: string
Expand Down Expand Up @@ -5787,7 +5787,7 @@ declare module 'coc.nvim' {
export function openResource(uri: string): Promise<void>

/**
* Resovle full path of module from yarn or npm global directory.
* Resolve full path of module from yarn or npm global directory.
*/
export function resolveModule(name: string): Promise<string>

Expand Down Expand Up @@ -6268,7 +6268,7 @@ declare module 'coc.nvim' {
* Get current cursor character offset in document,
* length of line break would always be 1.
*
* @returns Charactor offset.
* @returns Character offset.
*/
export function getOffset(): Promise<number>

Expand Down Expand Up @@ -6809,7 +6809,7 @@ declare module 'coc.nvim' {

export namespace listManager {
/**
* Registed list names set.
* Registered list names set.
*/
export const names: ReadonlyArray<string>
/**
Expand Down Expand Up @@ -7368,7 +7368,7 @@ declare module 'coc.nvim' {
revealOutputChannelOn?: RevealOutputChannelOn
/**
* The encoding use to read stdout and stderr. Defaults
* to 'utf8' if ommitted.
* to 'utf8' if omitted.
*/
stdioEncoding?: string
initializationOptions?: any | (() => any)
Expand Down Expand Up @@ -7418,7 +7418,7 @@ declare module 'coc.nvim' {
fillClientCapabilities(capabilities: any): void
/**
* Initialize the feature. This method is called on a feature instance
* when the client has successfully received the initalize request from
* when the client has successfully received the initialize request from
* the server and before the client sends the initialized notification
* to the server.
*
Expand All @@ -7429,7 +7429,7 @@ declare module 'coc.nvim' {
initialize(capabilities: any, documentSelector: DocumentSelector | undefined): void
/**
* Called when the client is stopped to dispose this feature. Usually a feature
* unregisters listeners registerd hooked up with the VS Code extension host.
* unregisters listeners registered hooked up with the VS Code extension host.
*/
dispose(): void
}
Expand Down Expand Up @@ -7596,7 +7596,7 @@ declare module 'coc.nvim' {
fillClientCapabilities(capabilities: any): void
/**
* Initialize the feature. This method is called on a feature instance
* when the client has successfully received the initalize request from
* when the client has successfully received the initialize request from
* the server and before the client sends the initialized notification
* to the server.
*
Expand All @@ -7620,7 +7620,7 @@ declare module 'coc.nvim' {
unregister(id: string): void
/**
* Called when the client is stopped to dispose this feature. Usually a feature
* unregisters listeners registerd hooked up with the VS Code extension host.
* unregisters listeners registered hooked up with the VS Code extension host.
*/
dispose(): void
}
Expand Down Expand Up @@ -7824,7 +7824,7 @@ declare module 'coc.nvim' {
stop(): Promise<void>

/**
* Start language server, not needed when registed to services by `services.registLanguageClient`
* Start language server, not needed when registered to services by `services.registLanguageClient`
*/
start(): Disposable
/**
Expand Down

0 comments on commit 179ca72

Please sign in to comment.