Can you tell me where exactly, Lazarus sets the style for warnings and hints? I tried to find them in Pascal Highlighter but I couldn't
You mean the color of the zigzag underline?
Not sure, but I believe it's hardcoded. Maybe at ide\etsrceditmarks.pas line 1064 (not tested, but it looks like it could be...>)
constructor TETMarks.Create(AOwner: TComponent);
const
DefMarkColorHint = TColor($00a5ff);
DefMarkColorError = clRed;
the warnings became apparent after FPC compiles the code.
Indeed. The warnings a generated by the fpc compiler.
You would get the same warnings, if you compiled your code outside of the Lazarus IDE. You would just get them as text.
The IDE only displays them. So you need to compile to get them.
You can go into "Project Options" to disable/enable individual warnings.
I like to try to add custom highlighting eg when hitting a shortcut, but not always.
Not sure what you mean?
But maybe this will help: Tools > Options > Editor > Display > User defined markup
See the attached image.
You can enter text that you want to be colored (including borders, underline, ...).
The example shows a "then" followed by a ";". If the conditional code would be on the next line, the semicolon would prevent it from being part of the "if".
- It is not a pattern. So I have the "then ;" with no space, 1, 2 or 3 spaces.
- It has no context. So it only works for very basic cases.
"User defined markup" can be toggled by keyboard. (add/remove word/terms/phrashes)
But not on a single word in just one location. => It always highlights *all* matches in the entire editor (or in all editors).