Closed roblourens closed 6 years ago
// Specifies the icon theme used in the workbench or 'null' to not show any file icons.
// - null: No file icons
// - vs-minimal
// - vs-seti
"workbench.iconTheme": "vs-seti",
// List of tags, comma separated, where the content shouldn't be reformatted. 'null' defaults to the 'pre' tag.
"html.format.contentUnformatted": "pre,code,textarea",
// List of tags, comma separated, that should have an extra newline before them. 'null' defaults to "head, body, /html".
"html.format.extraLiners": "head, body, /html",
// Maximum number of line breaks to be preserved in one chunk. Use 'null' for unlimited.
"html.format.maxPreserveNewLines": null,
// List of tags, comma separated, that shouldn't be reformatted. 'null' defaults to all tags listed at https://www.w3.org/TR/html5/dom.html#phrasing-content.
"html.format.unformatted": "wbr",
// Sets the locale used to report JavaScript and TypeScript errors. Requires using TypeScript 2.6.0 or newer in the workspace. Default of `null` uses VS Code's locale.
"typescript.locale": null,
These are the settings explicitly null | string
that I could find with a simple search. Of these, the HTML ones are the only concern. For most of them we should probably just get rid of accepting null, as it doesn't make a ton of sense to have null
just mean either default or some secondary default.
But "html.format.unformatted"
has very different behavior between null
and ''
so we'll have to decide on something to do there.
string | null
: fix requires API discussion over adding an additional emptyStringIsNull
schema parameterenum | null
: #56412 fixesnumber | null
: #56176 fixedboolean | null
: Probably wont fix? Would require some new components and UI/UX discussion.enum | boolean
: #56412 fixes@JacksonKearl @roblourens can you add some steps for how to verify?
Here are some settings with compound types
git.autoRepositoryDetection
html.format.maxPreserveNewLines
Test that they work as you'd expect.
I can't remember which extension has the nullable enum but you can test it with a contribution like
"configuration":{
"title": "testext",
"properties": {
"testext.setting1": {
"type": [
"null",
"string"
],
"enum": [
"option 1",
"option 2",
null
],
"description": "test setting"
}
}
}
@roblourens seems to work for the first one, but not second. e.g. here I cannot type "null":
I can only type numbers (I am on Windows).
For the null|number type, an empty input box will correspond to null
in the json
string | null
: Check whether it's ok to map""
tonull
enum | null
: Add 'null' or "None" item to enumnumber | null
:""
=>null
boolean | null
: ?? I don't see this in vscode's core settingsAlso,
enum | boolean
. Example: