mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-05-30 10:06:35 +03:00
ecode: Added --health command line parameter to get a health status (like helix editor).
This commit is contained in:
@@ -287,6 +287,31 @@ void LSPClientServerManager::memoryUsage( std::shared_ptr<TextDocument> doc ) {
|
||||
server->memoryUsage();
|
||||
}
|
||||
|
||||
const std::vector<LSPDefinition>& LSPClientServerManager::getLSPs() const {
|
||||
return mLSPs;
|
||||
}
|
||||
|
||||
LSPDefinition
|
||||
LSPClientServerManager::getLSPForLang( const std::string& lang,
|
||||
const std::vector<std::string>& extensions ) const {
|
||||
for ( const auto& lsp : mLSPs ) {
|
||||
if ( lsp.language == lang ) {
|
||||
return lsp;
|
||||
}
|
||||
|
||||
if ( !lsp.filePatterns.empty() ) {
|
||||
for ( const auto& file : lsp.filePatterns ) {
|
||||
for ( const auto& ext : extensions ) {
|
||||
if ( ext == file ) {
|
||||
return lsp;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
void LSPClientServerManager::didChangeWorkspaceFolders( const std::string& folder ) {
|
||||
mLSPWorkspaceFolder = { "file://" + folder, FileSystem::fileNameFromPath( folder ) };
|
||||
Lock l( mClientsMutex );
|
||||
|
||||
Reference in New Issue
Block a user