More work on the Spell-Checker (SpartanJ/ecode#515).

Spell-Checked a lot of code.
This commit is contained in:
Martín Lucas Golini
2025-08-21 01:43:42 -03:00
parent afdd219935
commit 4b4a5f3491
119 changed files with 606 additions and 497 deletions

View File

@@ -728,8 +728,9 @@ static json codeActionParams( const URI& document, const TextRange& range,
context[MEMBER_DIAGNOSTICS] = diags;
if ( !kinds.empty() )
context["only"] = json( kinds );
if ( !diagnostics.empty() )
params["context"] = diagnostics;
params["context"] = !diagnostics.empty()
? diagnostics
: nlohmann::json{ { "diagnostics", nlohmann::json::array() } };
return params;
}
@@ -1478,7 +1479,7 @@ LSPClientServer::LSPRequestHandle LSPClientServer::write( json&& msg, const Json
if ( mSocket ) {
size_t sent = 0;
mSocket->send( sjson.c_str(), sjson.size(), sent );
} else if ( !mProcess.isShuttingDown() && mProcess.isAlive() ) {
} else if ( !mProcess.isShuttingDown() && mProcess.isAlive() ) {
mProcess.write( sjson );
}
} else {