Python LSP Find All References / Go To Definition

We are using the Python LSP parser and, if possible, would like to enable some more advanced features like Find All References and Go To Definition. Right now, we see these in a context menu, but they don’t do anything.

Are these features supported in v7.0? If no, are they on your roadmap?

If yes, can you provide some guidance (or even better some sample code) for how to enable this for our Python content?


GotoDefinition should be already sipping the parser, you can use FindDeclaration call like this:
var declaration = pythonParser.FindDeclaration(syntaxEdit1.Position);

Finding references does not seem to be supported by the version of client library we’re using, but there is a newer version which we are currently looking at. I will update you once we find out whether it supports finding references.


We’ve updated our LSP parsers to the new version of the client library, and I can confirm that FindReferences functionality is working with it.

These changes will be included in the coming update (expected to be released end of this month).