[fpc-pascal] Pascal Language Server
Michael Van Canneyt
michael at freepascal.org
Tue Apr 28 10:45:05 CEST 2020
On Tue, 28 Apr 2020, Ryan Joseph via fpc-pascal wrote:
>> On Apr 28, 2020, at 3:26 PM, Michael Van Canneyt <michael at 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:
> 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
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.
More information about the fpc-pascal