-
Notifications
You must be signed in to change notification settings - Fork 28.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added split pane options to settings #82888
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 |
@@ -37,7 +37,8 @@ export const DEFAULT_EDITOR_PART_OPTIONS: IEditorPartOptions = { | |||
openSideBySideDirection: 'right', | |||
closeEmptyGroups: true, | |||
labelFormat: 'default', | |||
iconTheme: 'vs-seti' | |||
iconTheme: 'vs-seti', | |||
splitSizing: 'Distribute' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Controls the sizing of editor tabs.
=> Controls the sizing of editors when splitting them.
@@ -60,6 +60,16 @@ import { isMacintosh, isWindows, isLinux, isWeb, isNative } from 'vs/base/common | |||
], | |||
'description': nls.localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'tabSizing' }, "Controls the sizing of editor tabs.") | |||
}, | |||
'workbench.editor.splitSizing': { | |||
'type': 'string', | |||
'enum': ['Distribute', 'Split'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
workbench.editor.splitSizing.Distribute
=> workbench.editor.splitSizingDistribute
workbench.editor.splitSizing.Split
=> workbench.editor.splitSizingSplit
src/vs/workbench/common/editor.ts
Outdated
@@ -1025,6 +1025,7 @@ interface IEditorPartConfiguration { | |||
mouseBackForwardToNavigate?: boolean; | |||
labelFormat?: 'default' | 'short' | 'medium' | 'long'; | |||
restoreViewState?: boolean; | |||
splitSizing?: 'Split' | 'Distribute'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer lowercase distribute
and split
@@ -497,13 +497,18 @@ export class EditorPart extends Part implements IEditorGroupsService, IEditorGro | |||
return group; | |||
} | |||
|
|||
private _getSizingStyle(): Sizing { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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