@@ -92,12 +92,12 @@ export var provider: autocompleteplus.Provider = {
92
92
if ( ! fs . existsSync ( filePath ) ) return Promise . resolve ( [ ] ) ;
93
93
94
94
// If we are looking at reference or require path support file system completions
95
- var pathMatchers = [ 'reference.path.string' , 'require.path.string' , 'es6import.path.string' ] ;
95
+ var pathMatchers = [ 'reference.path.quoted. string' , 'require.path.quoted. string' , 'es6import.path.quoted .string' ] ;
96
96
var lastScope = options . scopeDescriptor . scopes [ options . scopeDescriptor . scopes . length - 1 ] ;
97
97
98
98
// For file path completions
99
99
if ( pathMatchers . some ( p => lastScope === p ) ) {
100
- return parent . getRelativePathsInProject ( { filePath, prefix : options . prefix , includeExternalModules : lastScope !== 'reference.path.string' } )
100
+ return parent . getRelativePathsInProject ( { filePath, prefix : options . prefix , includeExternalModules : lastScope !== 'reference.path.quoted. string' } )
101
101
. then ( ( resp ) => {
102
102
return resp . files . map ( file => {
103
103
var relativePath = file . relativePath ;
@@ -112,19 +112,19 @@ export var provider: autocompleteplus.Provider = {
112
112
type : 'path'
113
113
} ;
114
114
115
- if ( lastScope == 'reference.path.string' ) {
115
+ if ( lastScope == 'reference.path.quoted. string' ) {
116
116
suggestion . atomTS_IsReference = {
117
117
relativePath : relativePath
118
118
} ;
119
119
}
120
120
121
- if ( lastScope == 'require.path.string' ) {
121
+ if ( lastScope == 'require.path.quoted. string' ) {
122
122
suggestion . atomTS_IsImport = {
123
123
relativePath : relativePath
124
124
} ;
125
125
}
126
126
127
- if ( lastScope == 'es6import.path.string' ) {
127
+ if ( lastScope == 'es6import.path.quoted. string' ) {
128
128
suggestion . atomTS_IsES6Import = {
129
129
relativePath : relativePath
130
130
} ;
@@ -220,7 +220,7 @@ export var provider: autocompleteplus.Provider = {
220
220
221
221
// Use the option if they have a preferred. Otherwise preserve
222
222
quote = quote || groups [ 3 ] ;
223
-
223
+
224
224
options . editor . replaceSelectedText ( null , function ( ) { return `${ leadingWhiteSpace } import ${ alias } = require(${ quote } ${ options . suggestion . atomTS_IsImport . relativePath } ${ quote } );` ; } ) ;
225
225
}
226
226
if ( options . suggestion . atomTS_IsES6Import ) {
0 commit comments