Skip to content
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

change go to symbol in workspace shortcut to Include ALT #234243

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

konavivekramakrishna
Copy link

Fixes : #232381

Included Alt (option) for Go to Symbol in Workspace

@konavivekramakrishna
Copy link
Author

@TylerLeonhardt could you please check this?

Also, I tried to see if there are any existing tests that might be breaking, but I found that there are none.
Would you like me to update the documentation?

Copy link
Member

@jrieken jrieken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the intention of this change but this PR would change it for all platforms, e.g also desktop is not wanted.

The way to tackle this is to have another keybinding that is guarded with a isWebContext context key

@TylerLeonhardt
Copy link
Member

Additionally, the proposal in this PR would have CMD+alt+T not CTRL+alt+T on macOS. You will need to use WinCtrl instead of CtrlCmd for macOS

@konavivekramakrishna
Copy link
Author

@jrieken @TylerLeonhardt

Is this implementation correct?
I’m unsure how to launch the source version of VS Code in the web environment.
Currently, I am using ./scripts/code.bat to launch VS Code, but I’m not sure how to do this for the web (connect).

Am I missing any edge cases? If so, could you please point out where I’m going wrong?

@jrieken jrieken added this to the November 2024 milestone Nov 25, 2024
@jrieken
Copy link
Member

jrieken commented Nov 25, 2024

but I’m not sure how to do this for the web (connect).

You can use these script scripts: ./scripts/code-server or ./scripts/code-web

@konavivekramakrishna
Copy link
Author

konavivekramakrishna commented Nov 25, 2024

Thanks for the command

ps : not working as expected, will update!

@konavivekramakrishna
Copy link
Author

image
image
image

@jrieken
I have tried a few approaches, including adding a fallback for "Go to Symbol in Workspace" for the web, but I’m unsure why it is not working in the web environment.

super({
    id: Constants.SearchCommandIds.ShowAllSymbolsActionId,
    title: {
        ...nls.localize2('showTriggerActions', "Go to Symbol in Workspace..."),
        mnemonicTitle: nls.localize({ key: 'miGotoSymbolInWorkspace', comment: ['&& denotes a mnemonic'] }, "Go to Symbol in &&Workspace..."),
    },
    f1: true,
    keybinding: [
        {
            weight: KeybindingWeight.WorkbenchContrib,
            primary: KeyMod.CtrlCmd | KeyCode.KeyT
        },
        {
            weight: KeybindingWeight.WorkbenchContrib,
            when: ContextKeyExpr.and(IsWebContext),
            primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KeyE,
        }
    ],
    menu: {
        id: MenuId.MenubarGoMenu,
        group: '3_global_nav',
        order: 2
    }
});

Ideally, the keybinding Ctrl + Alt + E should toggle the "Go to Symbol in Workspace" feature on the web, but it does not seem to work. (Referred PR : #184585)

it also occurs in the native Windows app when assigning the keybinding Ctrl + Alt + E or Ctrl + Alt + E`.

Can you please help identify the issue or point out what might be going wrong?

@jrieken
Copy link
Member

jrieken commented Nov 26, 2024

Try running npm compile-web. This compiles extensions like TS for the web and I believe it only appears as not working while the true cause might be no extension support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Go to symbol in workspace shortcut in Codespaces (browser) is CTRL-T.
3 participants