I have the next code that works and compiled. The app runs with no errors, but the IDE shows a red stripe and hover popup:
E1030 Invalid compiler directive: 'private'
on code:
type
TForm1 = class(TForm)
PaintBox1: TPaintBox;
private
procedure PaintBox1Paint(Sender: TObject; Canvas: TCanvas);
end;
I do not know why, because the code compiles and runs. no problems.
the private is red striped:
Hover on the red explanation mark is what shows this:
E1030 Invalid compiler directive: 'private'
Can anyone explain why please?

taskkill /im delphilsp.exe /f(in a console window).Tools>Reload LSP Server. What will do the same thing discribed by Andreas