vscode-code-outline icon indicating copy to clipboard operation
vscode-code-outline copied to clipboard

Duplicate listing when more than one language extension providing symbols

Open ant-g opened this issue 6 years ago • 3 comments

I have two PHP extensions active Intellisense and Intelephense, so there are two sets of symbol data being created which do not get filtered when showing the code outline: image

Would be good if duplicates could be spotted and excluded from the tree?

ant-g avatar Jun 05 '18 10:06 ant-g

I'm not sure what to do about this. Would need to check if the symbols have identical ranges.

patrys avatar Jun 05 '18 11:06 patrys

I'm not familiar with typescript or vscode api, but if range is what is used to point to the correct file and line when selecting the node, then yes that would seem sensible to identify duplicates.

If you get the nodes from vs code in order, then it may just be a case of compare with previous or it might be a post-process activity once the initial tree is drawn and ordered, to loop through doing the compare with previous and removing/hiding if necessary?

Is there anything in the API that identifies the 'provider' or 'owner' of the symbol entry? If so then only pull in data from a single provider?

ant-g avatar Jun 05 '18 12:06 ant-g

I see same issue for Java

fmerici avatar Jun 07 '18 20:06 fmerici