-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
dda58a8
commit e96ac0b
Showing
7 changed files
with
76 additions
and
35 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { TextLine, Uri } from 'vscode' | ||
|
||
export interface SkinnyTextDocument { | ||
/** | ||
* The associated uri for this document. | ||
* | ||
* *Note* that most documents use the `file`-scheme, which means they are files on disk. However, **not** all documents are | ||
* saved on disk and therefore the `scheme` must be checked before trying to access the underlying file or siblings on disk. | ||
* | ||
* @see {@link FileSystemProvider} | ||
* @see {@link TextDocumentContentProvider} | ||
*/ | ||
readonly uri: Uri; | ||
|
||
/** | ||
* The file system path of the associated resource. Shorthand | ||
* notation for {@link TextDocument.uri TextDocument.uri.fsPath}. Independent of the uri scheme. | ||
*/ | ||
readonly fileName: string; | ||
|
||
/** | ||
* The number of lines in this document. | ||
*/ | ||
readonly lineCount: number; | ||
|
||
/** | ||
* Get the text of this document. | ||
* | ||
* @return The entire text. | ||
*/ | ||
getText(): string; | ||
|
||
/** | ||
* Returns a text line denoted by the line number. Note | ||
* that the returned object is *not* live and changes to the | ||
* document are not reflected. | ||
* | ||
* @param line A line number in [0, lineCount). | ||
* @return A {@link TextLine line}. | ||
*/ | ||
lineAt(line: number): TextLine; | ||
} |