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 () => {
21
21
if ( affectsConfiguration ( process . env . IDS_PREFIX ! ) ) syncConfig ( )
22
22
} )
23
23
syncConfig ( )
24
- setTimeout ( ( ) => syncConfig ( ) , 500 )
25
- setTimeout ( ( ) => syncConfig ( ) , 1500 )
26
24
}
Original file line number Diff line number Diff line change @@ -7,13 +7,17 @@ import _ from 'lodash'
7
7
import { GetConfig } from './types'
8
8
import { getCompletionsAtPosition , PrevCompletionMap } from './completionsAtPosition'
9
9
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 )
10
15
export = function ( { typescript } : { typescript : typeof import ( 'typescript/lib/tsserverlibrary' ) } ) {
11
16
const ts = typescript
12
- let _configuration : Configuration
13
- const c : GetConfig = key => get ( _configuration , key )
14
17
15
18
return {
16
19
create ( info : ts . server . PluginCreateInfo ) {
20
+ if ( info . languageService [ thisPluginMarker ] ) return info . languageService
17
21
// const realGetSnapshot = info.languageServiceHost.getScriptSnapshot
18
22
// info.languageServiceHost.getScriptSnapshot = fileName => {
19
23
// console.log('getSnapshot', fileName)
@@ -136,6 +140,8 @@ export = function ({ typescript }: { typescript: typeof import('typescript/lib/t
136
140
return prior
137
141
}
138
142
143
+ info . languageService [ thisPluginMarker ] = true
144
+
139
145
return proxy
140
146
} ,
141
147
onConfigurationChanged ( config : any ) {
You can’t perform that action at this time.
0 commit comments