Re: [fpc-pascal] Code tools search paths

2020-05-12 Thread Mattias Gaertner via fpc-pascal
On Wed, 13 May 2020 10:45:21 +0700 Ryan Joseph via fpc-pascal wrote: > > On May 11, 2020, at 8:02 PM, Ryan Joseph > > wrote: > > > > I wanted this to behave like the compiler normally does, that is > > you supply paths to the units with -Fu and includes with -Fi. What > > is the way to achieve

Re: [fpc-pascal] Code tools search paths

2020-05-12 Thread Ryan Joseph via fpc-pascal
> On May 11, 2020, at 8:02 PM, Ryan Joseph wrote: > > I wanted this to behave like the compiler normally does, that is you supply > paths to the units with -Fu and includes with -Fi. What is the way to achieve > that here? > > For example in my test project I have the directory that contains

Re: [fpc-pascal] Code tools search paths

2020-05-11 Thread Ryan Joseph via fpc-pascal
> On May 11, 2020, at 6:41 PM, Mattias Gaertner via fpc-pascal > wrote: > > This creates a node for directory Path. Path should be your program > directory. > > >> UnitPathTemplate := TDefineTemplate.Create('???','???', >>UnitPathMacroName, >>UnitPathMacro+';

Re: [fpc-pascal] Code tools search paths

2020-05-11 Thread Mattias Gaertner via fpc-pascal
On Mon, 11 May 2020 16:58:54 +0700 Ryan Joseph via fpc-pascal wrote: >[...] > 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). FPC is happy with ppu files. Codetools need

Re: [fpc-pascal] Code tools search paths

2020-05-11 Thread Ryan Joseph via fpc-pascal
> On May 11, 2020, at 4:55 PM, Mattias Gaertner via fpc-pascal > wrote: > > Yes, you can. > They are treated like global options, i.e. as if added to the fpc.cfg. Then I don't understand why those affect FindReferences but worked for other areas. Using those were easier than what I'm doing w

Re: [fpc-pascal] Code tools search paths

2020-05-11 Thread Ryan Joseph via fpc-pascal
> On May 11, 2020, at 10:56 AM, Ryan Joseph 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

Re: [fpc-pascal] Code tools search paths

2020-05-11 Thread Mattias Gaertner via fpc-pascal
On Mon, 11 May 2020 10:56:32 +0700 Ryan Joseph via fpc-pascal wrote: > > On May 10, 2020, at 4:47 PM, Mattias Gaertner via fpc-pascal > > wrote: > > > > TDefineTemplates. > > see for example > > lazarus/components/codetools/examples/setincludepath.pas > > > > Ok, I'll move to this. What are

Re: [fpc-pascal] Code tools search paths

2020-05-10 Thread Ryan Joseph via fpc-pascal
> On May 10, 2020, at 4:47 PM, Mattias Gaertner via fpc-pascal > wrote: > > TDefineTemplates. > see for example > lazarus/components/codetools/examples/setincludepath.pas > 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 in

Re: [fpc-pascal] Code tools search paths

2020-05-10 Thread Mattias Gaertner via fpc-pascal
On Sun, 10 May 2020 16:34:11 +0700 Ryan Joseph via fpc-pascal wrote: > I found out that setting TCodeToolsOptions.FPCOptions (-Fu and -Fi) > was doing something because it helped FindDeclaration to search for > units not in the same same directory as the main program. However now > I've encounter