On Tue, 28 Apr 2020, Ryan Joseph via fpc-pascal wrote:



On Apr 28, 2020, at 3:45 PM, Michael Van Canneyt <mich...@freepascal.org> wrote:

Why do you think so ? The codetools will find all referenced units that it 
finds in the unit search path.

You're right. I was thinking there are going to be units that aren't referenced 
by the main program but why do you really want to search those anyways as they 
aren't actually part of the program.

I'll see how it works to provide a main program file.  I guess it can
search for lazarus projects to insepect also but I'll leave that for
later.  My problems are mainly related to not having a notion of a project
file like in lazarus that we can read paths from.

You can do what most VSCode/Atom project managers seem to, add package.json
or somesuch:

{
  "pascal-lsp" : {
    "projectfile" : "yourproject.pas",
    "searchpath" : ["a","b"]
  }
}

And use that as a starting point. As a fallback you can scan for lpi/lpr
(would be helpful for lazarus users)

Most plugins I saw till now use a kind of helper file in the project dir.

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

Reply via email to