Skip to content

Disable formatting a region of code using directives #18261

Open
@mjbvz

Description

@mjbvz

From: microsoft/vscode#33772

TypeScript Version: 2.4.0 / nightly (2.5.0-dev.201xxxxx)

Feature Request
Add a way to disable formatting of a region of code. An example of this is js beatuify's preserve directive:

// Use preserve when the content is not javascript, but you don't want it reformatted.
/* beautify preserve:start */
{
    browserName: 'internet explorer',
    platform:    'Windows 7',
    version:     '8'
}
/* beautify preserve:end */

Metadata

Metadata

Assignees

No one assigned

    Labels

    Awaiting More FeedbackThis means we'd like to hear from more people who would be helped by this featureDomain: FormatterThe issue relates to the built-in formatterSuggestionAn idea for TypeScriptVS Code TrackedThere is a VS Code equivalent to this issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions