added split pane options to settings#82888
Conversation
|
@dhairyanadapara I think you are adding the option on the wrong layer (monaco editor), shouldn't the setting appear very similar to other existing editor settings, such as |
bace6a2 to
3fe5f8b
Compare
|
Thanks, @bpasero. Found out the same. I have moved options to |
| labelFormat: 'default', | ||
| iconTheme: 'vs-seti' | ||
| iconTheme: 'vs-seti', | ||
| splitSizing: 'Distribute' |
There was a problem hiding this comment.
I would prefer lowercase distribute and split
| nls.localize('workbench.editor.splitSizing.Distribute', "Splits all the editors to equal parts."), | ||
| nls.localize('workbench.editor.splitSizing.Split', "Splits the active editor to equal parts.") | ||
| ], | ||
| 'description': nls.localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'splitSizing' }, "Controls the sizing of editor tabs.") |
There was a problem hiding this comment.
Controls the sizing of editor tabs. => Controls the sizing of editors when splitting them.
| }, | ||
| 'workbench.editor.splitSizing': { | ||
| 'type': 'string', | ||
| 'enum': ['Distribute', 'Split'], |
There was a problem hiding this comment.
I would prefer lowercase distribute and split
| 'enum': ['Distribute', 'Split'], | ||
| 'default': 'Distribute', | ||
| 'enumDescriptions': [ | ||
| nls.localize('workbench.editor.splitSizing.Distribute', "Splits all the editors to equal parts."), |
There was a problem hiding this comment.
workbench.editor.splitSizing.Distribute => workbench.editor.splitSizingDistribute
workbench.editor.splitSizing.Split => workbench.editor.splitSizingSplit
src/vs/workbench/common/editor.ts
Outdated
| mouseBackForwardToNavigate?: boolean; | ||
| labelFormat?: 'default' | 'short' | 'medium' | 'long'; | ||
| restoreViewState?: boolean; | ||
| splitSizing?: 'Split' | 'Distribute'; |
There was a problem hiding this comment.
I would prefer lowercase distribute and split
| return group; | ||
| } | ||
|
|
||
| private _getSizingStyle(): Sizing { |
There was a problem hiding this comment.
| private _getSizingStyle(): Sizing { | |
| private getSplitSizingStyle(): Sizing { | |
| const splitStyle = this._partOptions.splitSizing; | |
| if (splitStyle === 'Split') { | |
| return Sizing.Split; | |
| } | |
| return Sizing.Distribute; | |
| } |
|
Thanks 👍 |
|
Thanks, @bpasero. This was my first contribution to open source and I enjoyed it. If you found any other issue in which I can help, please assign it. Thanks again for helping. :) |
This PR fixes #79665