Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 358
Luís Henrique Faria Avatar asked Jul 05 '17 17:07

Luís Henrique Faria


1 Answers

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.

like image 119
Gama11 Avatar answered Oct 04 '22 18:10

Gama11