> On May 11, 2020, at 10:56 AM, Ryan Joseph <generic...@gmail.com> wrote:
> 
> Ok, I'll move to this. What are the FPC options for then? I thought I could 
> do things like -Fu and -d with it.
> 
> Are include paths and unit paths the same? I just see TDefineTemplate which 
> seems to do both.

Removing the FPCOptions fixed the FindReferences but I still don't seem to be 
getting your define template system:

If I just want to add unit search paths do I do this? The user is just going to 
supply absolute paths to the language server (just like they would from the 
command line).


// add all the unit paths
for Path in Paths do
begin
        DirectoryTemplate := 
TDefineTemplate.Create('Directory','','',ExpandFileName(Path),da_Directory);

          UnitPathTemplate := TDefineTemplate.Create('???','???',
            UnitPathMacroName,
            UnitPathMacro+';'+ExpandFileName(Path),
            da_Define
            );
          DirectoryTemplate.AddChild(UnitPathTemplate);

          CodeToolBoss.DefineTree.Add(DirectoryTemplate);
end;


Regards,
        Ryan Joseph

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

Reply via email to