Skip to content

Provide encoding-related APIs for editor extensions#239961

Closed
bpasero wants to merge 27 commits into
mainfrom
ben/editor-encoding-api-fork
Closed

Provide encoding-related APIs for editor extensions#239961
bpasero wants to merge 27 commits into
mainfrom
ben/editor-encoding-api-fork

Conversation

@bpasero
Copy link
Copy Markdown
Contributor

@bpasero bpasero commented Feb 7, 2025

for #824

export interface TextDocument {

	readonly encoding: string;

	save(options?: { encoding?: string }): Thenable<boolean>;
}

export namespace workspace {
	export function openTextDocument(uri: Uri, options?: { encoding?: string }): Thenable<TextDocument>;
	export function openTextDocument(path: string, options?: { encoding?: string }): Thenable<TextDocument>;
	export function openTextDocument(options?: { language?: string; content?: string; encoding?: string; }): Thenable<TextDocument>;
}

@bpasero bpasero self-assigned this Feb 7, 2025
@bpasero bpasero changed the title wip draft Provide encoding-related APIs for editor extensions Feb 13, 2025
@lygstate
Copy link
Copy Markdown

long waiting, thanks!

@bpasero bpasero added this to the On Deck milestone Feb 13, 2025
return Promise.resolve(cached);
}

let promise = this._documentLoader.get(uri.toString());
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✋ this needs to account for different encodings

Comment on lines +70 to +71
get encoding() { return that._encoding; },
save(options?: { encoding?: string }) { return that._save(options); },
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✋ Missed proposed API checks

@bpasero
Copy link
Copy Markdown
Contributor Author

bpasero commented Feb 14, 2025

Continues in #240804

@bpasero bpasero closed this Feb 14, 2025
@bpasero bpasero deleted the ben/editor-encoding-api-fork branch February 16, 2025 07:43
@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators Mar 31, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants