On Tue, 28 Apr 2020, Ryan Joseph via fpc-pascal wrote:
On Apr 28, 2020, at 3:26 PM, Michael Van Canneyt <mich...@freepascal.org> wrote:
That's a wrong approach. Pascal units are in a uses-tree. You need a starting
point, the top of the tree: a single module.
I can make the user provide the program file and start from there but then the
references in other units not related to the main program will not be found.
Why do you think so ?
The codetools will find all referenced units that it finds in the unit search path.
Mattias says we can call AddStartUnit multiple times but there's no logic I can
use besides adding all files in the provided directories.
You don't need all files. You just need a starting point: the project.
Here's what I'm trying to implement:
https://microsoft.github.io/language-server-protocol/specifications/specification-3-14/#textDocument_references
It's just a project wide search so what can we do besides just add all files
found in the project?
You don't need all files, as far as I can see.
"The references request is sent from the client to the server to resolve
project-wide references for the symbol denoted by the given text document
position."
As far as I can tell this means:
You don't need to do anything except add the project file.
The codetools will use that as the starting point and that's it.
Michael.
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal