This commit is contained in:
Martín Lucas Golini
2023-02-23 01:30:17 -03:00
parent 353988f292
commit bf367b0dcb
4 changed files with 7 additions and 4 deletions

View File

@@ -55,7 +55,8 @@ std::string LSPClientServerManager::findRootPath( const LSPDefinition& lsp,
const std::shared_ptr<TextDocument>& doc ) {
if ( lsp.rootIndicationFileNames.empty() || !doc->hasFilepath() )
return "";
std::string rootPath( doc->getFileInfo().getDirectoryPath() );
std::string oriRootPath( doc->getFileInfo().getDirectoryPath() );
std::string rootPath( oriRootPath );
std::string lRootPath;
FileSystem::dirAddSlashAtEnd( rootPath );
@@ -73,7 +74,7 @@ std::string LSPClientServerManager::findRootPath( const LSPDefinition& lsp,
rootPath = FileSystem::removeLastFolderFromPath( rootPath );
}
return "";
return oriRootPath;
}
void LSPClientServerManager::tryRunServer( const std::shared_ptr<TextDocument>& doc ) {