KEMBAR78
Implement token-based language service · Issue #82024 · microsoft/vscode · GitHub
Skip to content

Implement token-based language service #82024

@jeremy447

Description

@jeremy447

Go to Definition and Find All Reference are not 100% reliable in VsCode. The problem occur with VsCode itself for the langages it handle and with extensions for the others langages. VsCode (or the extensions) sometimes doesn't find any definition, or sometimes they don't find all references. That happen because the way of finding the definition and references is based on a certain level of "understanding" of the code. So when the code do something that make it hard to find definition and references you end up with something broken.

I don't have any exemple for a language that VsCode handle but that not hard to find. I have one with Prestashop 1.6.1 source code with the extension Intelephense. If you try to go to definition of $product->addCombinationEntity in controllers/admin/AdminImportController.php it doesn't find any definition and if you try to find all references of $product->addCombinationEntity it doesn't find anything. It fail besause the way that Prestashop name and load Class (bmewburn/vscode-intelephense#700).

On the other hand Go to definition and Find all references work 100% of the time in Sublime text and a lot of developers would love to have something similar in VsCode. It seem that Sublime just make a text search to show definition and reference. It's very basic since it show you everything it find even in other langage (ex: js whereas you are in a php file...) but it find everything and it's very reliable. If we can have the same thing in VsCode maybe even better if you limit the search to relevant code (same langage) it will be awesome. Maybe as a workspace option to activate only on project that need it.

Text search is far from perfect but it's far far better than having nothing or, worse, missing references for example when you need to modify all of them. I think a lot of developers rely on Go to definition and Find all reference to quickly navigate through code. A lot of developers use Sublime and love it whereas it have only a very basic text search based Go to definition and Find all reference but that work 100% of the time. Again, an optional text search in complement will make VsCode on par with Sublime for these features, and even better if you manage to limit the result to relevant code, and will fulfill the need of a lot of developers.

We need these features to be 100% reliable to use them professionally so, in my opinion, it's almost mandatory to include an optional text search in Go to definition and Find all references. Thanks !

Metadata

Metadata

Assignees

Labels

extensionsIssues concerning extensionsfeature-requestRequest for new features or functionalitylanguages-basicBasic language support issues

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions