@@ -54,12 +54,15 @@ export class LanguageProvider {
5454 private $hoverTooltip : HoverTooltip ;
5555 $urisToSessionsIds : { [ uri : string ] : string } = { } ;
5656 workspaceUri : string ;
57- requireFilePath : boolean = false ;
5857 private $lightBulbWidgets : { [ editorId : string ] : LightbulbWidget } = { } ;
5958 private stylesEmbedded : boolean ;
6059 private inlineCompleter ?: any ;
6160 private doLiveAutocomplete : ( e ) => void ;
62- private completerAdapter ?: { InlineCompleter : any ; doLiveAutocomplete : ( e ) => void ; validateAceInlineCompleterWithEditor : ( editor : Ace . Editor ) => void ; } ;
61+ private completerAdapter ?: {
62+ InlineCompleter : any ;
63+ doLiveAutocomplete : ( e ) => void ;
64+ validateAceInlineCompleterWithEditor : ( editor : Ace . Editor ) => void ;
65+ } ;
6366
6467 private constructor ( worker : Worker , options ?: ProviderOptions ) {
6568 this . $messageController = new MessageController ( worker , this ) ;
@@ -141,7 +144,6 @@ export class LanguageProvider {
141144 } ) ;
142145
143146 this . options . markdownConverter ||= new showdown . Converter ( ) ;
144- this . requireFilePath = this . options . requireFilePath ?? false ;
145147 if ( options ?. workspacePath ) {
146148 this . workspaceUri = convertToUri ( options . workspacePath ) ;
147149 }
@@ -621,7 +623,6 @@ class SessionLanguageProvider {
621623 private $isConnected = false ;
622624 private $options ?: ServiceOptions ;
623625 private $filePath : string ;
624- private $isFilePathRequired = false ;
625626 private $servicesCapabilities ?: { [ serviceName : string ] : lsp . ServerCapabilities } ;
626627 private $requestsQueue : Function [ ] = [ ] ;
627628
@@ -655,7 +656,6 @@ class SessionLanguageProvider {
655656 this . $messageController = messageController ;
656657 this . session = session ;
657658 this . editor = editor ;
658- this . $isFilePathRequired = provider . requireFilePath ;
659659
660660 session . doc . version = 1 ;
661661 session . doc . on ( "change" , this . $changeListener , true ) ;
@@ -689,8 +689,6 @@ class SessionLanguageProvider {
689689 setFilePath ( filePath : string ) {
690690 this . enqueueIfNotConnected ( ( ) => {
691691 this . session . doc . version ++ ;
692- if ( this . $filePath !== undefined ) //TODO change file path
693- return ;
694692 this . $filePath = filePath ;
695693 const previousComboId = this . comboDocumentIdentifier ;
696694 this . initDocumentUri ( true ) ;
@@ -699,8 +697,6 @@ class SessionLanguageProvider {
699697 } ;
700698
701699 private $init ( ) {
702- if ( this . $isFilePathRequired && this . $filePath === undefined )
703- return ;
704700 this . initDocumentUri ( ) ;
705701 this . $messageController . init ( this . comboDocumentIdentifier , this . session . doc , this . $mode , this . $options , this . $connected ) ;
706702 }
0 commit comments