Open mskamp opened 7 months ago
I think this was a regression from an overhaul by @mvancanneyt. Not sure anything can work with ApplySettings being called! What do you think Michael?
I think it was an oversight while reworking the code. ApplySettings() should be called, I will look into it.
I'm also having an issue with the server capabilities being claimed to be limited.
@mskamp how exactly did you call the ApplySettings function so I can do the same?
@LinusDenning2001 Here is the diff of my changes, which I've applied to the current trunk
:
diff --git a/src/serverprotocol/PasLS.General.pas b/src/serverprotocol/PasLS.General.pas
index 2669aff..8436bda 100644
--- a/src/serverprotocol/PasLS.General.pas
+++ b/src/serverprotocol/PasLS.General.pas
@@ -441,6 +441,8 @@ begin
IdentifierList.SortMethodForCompletion:=icsScopedAlphabetic;
end;
+ Result.Capabilities.ApplySettings(ServerSettings);
+
// Set search path for codetools.
RootPath:=TDefineTemplate.Create('RootPath','RootPath','',CodetoolsOptions.ProjectDir,da_Directory);
if ServerSettings.includeWorkspaceFoldersAsUnitPaths then
With a build of the latest
trunk
, the language server claims to support a very limited set of capabilities:For example, since
"referencesProvider":false
, the language server claims to not support the “references” method, contrary to what is claimed inREADME.md
.It appears that this behavior has changed with commit d70ca94dcff452406ca154d8871300a099d3c24b. Notably, the call to ApplySettings has been removed but not inserted again. The logic for setting capabilities like
"referencesProvider"
, however, has been moved to ApplySettings. Yet, this method is never called.When adding a call to
ApplySettings
inPasLS.General.pas:443
, the reported capabilities change as follows:This list is more in line with the claims in
README.md
. Still, I'm not sure whereApplySettings
is supposed to be called and if the position noted above is the intended one.