On Mon, 11 May 2020 16:58:54 +0700 Ryan Joseph via fpc-pascal <fpc-pascal@lists.freepascal.org> 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 sources. So it needs the settings where the ppu files are coming from. Therefore codetools allows to have different settings for each directory. > // add all the unit paths > for Path in Paths do > begin > DirectoryTemplate := > TDefineTemplate.Create('Directory','','',ExpandFileName(Path),da_Directory); This creates a node for directory Path. Path should be your program directory. > UnitPathTemplate := TDefineTemplate.Create('???','???', > UnitPathMacroName, > UnitPathMacro+';'+ExpandFileName(Path), > da_Define > ); > DirectoryTemplate.AddChild(UnitPathTemplate); This expands the UnitPath of directory Path with Path. Maybe you meant UnitPathMacro+';'+ExpandFileName(SomeUnitPath), ? > CodeToolBoss.DefineTree.Add(DirectoryTemplate); > end; Mattias _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal