-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
72 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export type { Position } from './position'; | ||
export type { Range } from './range'; | ||
export type { TextEdit } from './text-edit'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { Range } from './range'; | ||
|
||
export interface TextEdit { | ||
range: Range; | ||
newText: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export type { OnTypeFormattingProvider, OnTypeFormattingProviderFactory } from './on-type-formatting-provider'; |
16 changes: 16 additions & 0 deletions
16
packages/core/src/formatting/on-type-formatting-provider.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { Position } from '../common/position'; | ||
import { TextEdit } from '../common/text-edit'; | ||
import { Document } from '../document/document'; | ||
import { DocumentManager } from '../document/document-manager'; | ||
|
||
export type OnTypeFormattingProviderFactory<T extends Document> = ( | ||
DocumentManager: DocumentManager<T>, | ||
) => OnTypeFormattingProvider; | ||
|
||
export interface OnTypeFormattingProvider { | ||
readonly id: string; | ||
|
||
readonly onTypeTriggerCharacters: ReadonlySet<string>; | ||
|
||
getOnTypeEdits(uri: string, position: Position, ch: string): Promise<TextEdit[] | undefined>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
export * from './common'; | ||
export * from './diagnostic'; | ||
export * from './document'; | ||
export * from './formatting'; | ||
export * from './workspace'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters