Change:
Type: <bFeature Request</bThere is a bit of space at the start of the breadcrumb which could accommodate a pin / pinned codicon with which to toggle the stickyScroll setting. ! When no DocumentSymbolProvider is available the space could either be blank or could show the pin codicon if the setting is currently false and the pinned-dirty if true, with a hover tip explaining why sticky scrolling isn't happening for the current document. /assign VS Code version: Code - Insiders 1.71.0-insider (, 2022-08-10T05:17:53.560Z) OS version: Windows_NT x64 10.0. Modes: Sandboxed: Yes <!-- generated by issue reporter --
Thanks for the idea, I will bring it up in the UX Sync today
<!-- -96bd-47a8-a0e8- --This feature request is now a candidate for our backlog. The community has 60 days to the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our . Happy Coding!
<img width="661" alt="Screenshot 2022-08-16 at 10 40 37" src="https://user-"I would go with the more traditional entry in the "View"-menu first, similar to existing action. The pin/unpin icon in breadcrumbs might be seen as noisy for when you don't want to use sticky scroll (appears like an ad) This is how it is done for the We can also combine this with and add context menu entries for breadcrumbs and sticky-scroll to toggle them in-place
I'll look into this

Discussion:
import { Disposable, DisposableStore } from 'vs/base/common/lifecycle'; import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; <del> import { registerEditorContribution } from 'vs/editor/browser/editorExtensions'; </del> <ins> import { registerEditorContribution, ServicesAccessor } from 'vs/editor/browser/editorExtensions'; </ins> import { IEditorContribution } from 'vs/editor/common/editorCommon'; import { ILanguageFeaturesService } from 'vs/editor/common/services/languageFeatures'; import { EditorOption, RenderLineNumbersType } from 'vs/editor/common/config/editorOptions'; import { StickyScrollWidget, StickyScrollWidgetState } from './stickyScrollWidget'; import { StickyLineCandidateProvider, StickyRange } from './stickyScrollProvider'; import { IModelTokensChangedEvent } from 'vs/editor/common/textModelEvents'; <ins> import { Action2, MenuId, registerAction2 } from 'vs/platform/actions/common/actions'; import { localize } from 'vs/nls'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; </ins> class StickyScrollController extends Disposable implements IEditorContribution {

registerEditorContribution(StickyScrollController.ID, StickyScrollController); <ins> registerAction2(class ToggleStickyScroll extends Action2 { constructor() { super({ id: 'editor.action.toggleStickyScroll', title: { value: localize('toggleStickyScroll', "Toggle Sticky Scroll"), mnemonicTitle: localize('miStickyScroll', "&&Sticky Scroll"), original: 'Toggle Sticky Scroll', }, // Hardcoding due to import violation category: { value: localize('view', "View"), original: 'View' }, toggled: ContextKeyExpr.equals('config.editor.experimental.stickyScroll.enabled', true), menu: [ { id: MenuId.CommandPalette }, { id: MenuId.MenubarViewMenu, group: '5_editor', order: 6 }, ] }); } override async run(accessor: ServicesAccessor): Promise<void> { const configurationService = accessor.get(IConfigurationService); const newValue = !configurationService.getValue('editor.experimental.stickyScroll.enabled'); return configurationService.updateValue('editor.experimental.stickyScroll.enabled', newValue); } }); </ins>