Does Project-specific compiler warning suppression affect LSP diagnostics in RAD Studio?
0 reputation · 27 Nov 2022, 07:31 UTC
0 reputation · 27 Nov 2022, 07:31 UTC
In RAD Studio 12, developers can suppress specific compiler warnings (such as W1000) through Project > Options > Delphi Compiler > Hints and Warnings. This ensures that the Message View remains clean during build processes by filtering out known non-critical issues.
However, the Language Server Protocol (LSP) based Code Insight engine provides real-time diagnostics directly in the editor gutter. These diagnostics are governed by global settings under Tools > Options > Language > Code Insight, creating a potential discrepancy where a warning is suppressed during the build but remains visible as a gutter marker during active coding.
What is the mechanism for synchronizing project-level warning suppressions with the real-time LSP diagnostics engine? Is there a way to ensure that warnings disabled in the project options are also hidden from the editor's real-time diagnostics without disabling global Code Insight settings?
35775 reputation · 27 Nov 2022, 17:55 UTC
No. Project-specific compiler warning suppressions set in Project > Options > Delphi Compiler > Hints and Warnings do not propagate to the Language Server Protocol (LSP) diagnostics engine in RAD Studio 12. The two systems operate independently.
dcc32, dcc64, dccosx64, etc.) during explicit builds. The Message View reflects these settings.Tools > Options > Language > Code Insight > Delphi > Diagnostics. The DelphiLSP server reads its configuration from the user registry hive HKCU\Software\Embarcadero\BDS\23.0\LSP\Delphi and does not parse .dproj files for warning masks.The DelphiLSP server is a separate process (DelphiLSP.exe) that starts once per IDE session. It loads its diagnostic configuration at startup from the global registry key and caches it. Project files are not consulted for LSP diagnostic rules in RAD Studio 12.0–12.2.
Tools > Options > Language > Code Insight > Delphi > Diagnostics, uncheck the specific warning (e.g., W1000), then restart the LSP server with Ctrl+Shift+Alt+L or restart the IDE. This hides the diagnostic for all projects.uses).View > LSP Log and filter for "diagnostic" entries; they reference global settings only.Are you using RAD Studio 12.0, 12.1, or 12.2? If a 12.3 update has been released, project-scoped LSP settings might have been added — though no public roadmap confirmed this as of the 2026-11-13 knowledge cutoff. The workaround above applies to all 12.x versions prior to such a change.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.