File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,4 @@ export const activate = async () => {
2121 if ( affectsConfiguration ( process . env . IDS_PREFIX ! ) ) syncConfig ( )
2222 } )
2323 syncConfig ( )
24- setTimeout ( ( ) => syncConfig ( ) , 500 )
25- setTimeout ( ( ) => syncConfig ( ) , 1500 )
2624}
Original file line number Diff line number Diff line change @@ -7,13 +7,17 @@ import _ from 'lodash'
77import { GetConfig } from './types'
88import { getCompletionsAtPosition , PrevCompletionMap } from './completionsAtPosition'
99
10+ const thisPluginMarker = Symbol ( '__essentialPluginsMarker__' )
11+
12+ // just to see wether issue is resolved
13+ let _configuration : Configuration
14+ const c : GetConfig = key => get ( _configuration , key )
1015export = function ( { typescript } : { typescript : typeof import ( 'typescript/lib/tsserverlibrary' ) } ) {
1116 const ts = typescript
12- let _configuration : Configuration
13- const c : GetConfig = key => get ( _configuration , key )
1417
1518 return {
1619 create ( info : ts . server . PluginCreateInfo ) {
20+ if ( info . languageService [ thisPluginMarker ] ) return info . languageService
1721 // const realGetSnapshot = info.languageServiceHost.getScriptSnapshot
1822 // info.languageServiceHost.getScriptSnapshot = fileName => {
1923 // console.log('getSnapshot', fileName)
@@ -136,6 +140,8 @@ export = function ({ typescript }: { typescript: typeof import('typescript/lib/t
136140 return prior
137141 }
138142
143+ info . languageService [ thisPluginMarker ] = true
144+
139145 return proxy
140146 } ,
141147 onConfigurationChanged ( config : any ) {
You can’t perform that action at this time.
0 commit comments