Luís Henrique Faria
Luís Henrique Faria

Reputation: 1699

It is possible to filter the symbols by type?

When I use goToSymbol command (php file for instance) it shows all symbols of the file (classes, methods, functions, variables, callbacks etc). In 99% of the cases I just want to see methods. How can I get a list of methods only?

Upvotes: 17

Views: 2081

Answers (1)

Gama11
Gama11

Reputation: 34148

I don't think it's possible to list only methods, but you can add a : to the filter textbox to group results by type:

If you want to have a keybinding for this, you can pass the text that should be pre-filled via the "args" of the "workbench.action.quickOpen" command (source):

{
    "key": "<keybinding>",
    "command": "workbench.action.quickOpen",
    "args": "@:"
}

Unfortunately the : seems to be preselected, which might be a bug considering other "special characters" like @ and > are not.

Upvotes: 27

Related Questions