Delphi 11.2 has been out for some months now.
Unfortunately, issues have crept into the 11.2 version of DelphiLSP - the compiler driven LSP server which provides ErrorInsight and Code Completion information to the IDE.
This often results in the LSP server stops returning any results, from within minutes to hours when loading a project - much to frustration for users, inclusive myself and required frequent restarts of the LSP server.
Just after the release of 11.2 and reports started to mount with how unstable Code Completion was, I discovered you can use the more stable Delphi 11.1 LSP server to restore the most important functionality - Code Completion and Error Insight.
Given that the first reports were inconssitent, I was holding off to propose this temporary workaround until Embarcadero had a chance to assess the scope of the instabilities and how to address them, hence the blog post now.
Thanks to how LSP works, we can easily apply this fix.
Please keep in mind it is a temporary workaround, especially if your project is large.
Some functionality will not work, like mouse hovering a method or variable.
This can of course be a deal breaker for some, but I think it is an acceptable tradeoff for having stable code completion until 11.3 comes around (The beta is now open for customers with active update subscription. I'd encourage you to sign up and help test the next release, especially around code completion as your input will help improve this area significantly).
You can download the Delphi 11.1 LSP Server directly from Embarcadero Here
To install, follow the steps below:
- First make sure the RAD Studio IDE is closed
- Navigate to the install directory of RAD Studio, where bds is located. A default install are usually %programfiles(x86)%\Embarcadero\Studio\22.0\bin
- Make a backup copy of DelphiLSP.exe
- Verify the SHA256 signature of the downloaded zip file
- Extract DelphiLSP from the zip file, and copy it over into the bin folder as noted above.
- Make sure the executable is still named DelphiLsp.exe
- Start the IDE and test code completion.