On Tue, 28 Apr 2020, Mattias Gaertner via fpc-pascal wrote:

On Tue, 28 Apr 2020 09:34:36 +0700
Ryan Joseph via fpc-pascal <fpc-pascal@lists.freepascal.org> wrote:

> On Apr 28, 2020, at 4:18 AM, Mattias Gaertner via fpc-pascal
> <fpc-pascal@lists.freepascal.org> wrote:
[...]
LSP doesn't have a concept of the "main file" but this seems to
require the main program file to start the search from. All we get
from LSP is the workspace root directory and I've passed in some -Fu
paths via FPCOptions.

Is there a workaround to this or can we get the main program from
code tools?

You can add any number of files as start. Just call AddStartUnit
for every starting module.
For example add all Pascal modules of the workspace directory.

For clarity: a module is a program or library or lazarus package.

That means you'll need to scan for it, or add some special file.

TMS Software's VS Code studio plugin also requires the presence of 1 .dproj file
in the top-level directory. Similar here.

Michael.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to