mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-08-18 06:55:48 +03:00
FoldRangeProvider is now an interface.
Fix rare crash in linter plugin.
This commit is contained in:
@@ -30,9 +30,7 @@ void LSPDocumentClient::onServerInitialized() {
|
||||
}
|
||||
|
||||
void LSPDocumentClient::setupFoldRangeService() {
|
||||
mDoc->getFoldRangeService().setProvider( [this]( auto, bool requestFolds ) -> bool {
|
||||
return tryRequestFoldRanges( requestFolds );
|
||||
} );
|
||||
mDoc->getFoldRangeService().setProvider( this );
|
||||
if ( mDoc->getFoldRangeService().isEnabled() )
|
||||
tryRequestFoldRanges( true );
|
||||
}
|
||||
@@ -57,6 +55,10 @@ bool LSPDocumentClient::tryRequestFoldRanges( bool requestFolds ) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool LSPDocumentClient::foldingRangeProvider() const {
|
||||
return mServer->getCapabilities().foldingRangeProvider;
|
||||
}
|
||||
|
||||
void LSPDocumentClient::onDocumentLoaded( TextDocument* ) {
|
||||
refreshTag();
|
||||
requestSemanticHighlightingDelayed();
|
||||
|
||||
Reference in New Issue
Block a user