@@ -92,12 +92,12 @@ export var provider: autocompleteplus.Provider = {
9292 if ( ! fs . existsSync ( filePath ) ) return Promise . resolve ( [ ] ) ;
9393
9494 // 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' ] ;
9696 var lastScope = options . scopeDescriptor . scopes [ options . scopeDescriptor . scopes . length - 1 ] ;
9797
9898 // For file path completions
9999 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' } )
101101 . then ( ( resp ) => {
102102 return resp . files . map ( file => {
103103 var relativePath = file . relativePath ;
@@ -112,19 +112,19 @@ export var provider: autocompleteplus.Provider = {
112112 type : 'path'
113113 } ;
114114
115- if ( lastScope == 'reference.path.string' ) {
115+ if ( lastScope == 'reference.path.quoted. string' ) {
116116 suggestion . atomTS_IsReference = {
117117 relativePath : relativePath
118118 } ;
119119 }
120120
121- if ( lastScope == 'require.path.string' ) {
121+ if ( lastScope == 'require.path.quoted. string' ) {
122122 suggestion . atomTS_IsImport = {
123123 relativePath : relativePath
124124 } ;
125125 }
126126
127- if ( lastScope == 'es6import.path.string' ) {
127+ if ( lastScope == 'es6import.path.quoted. string' ) {
128128 suggestion . atomTS_IsES6Import = {
129129 relativePath : relativePath
130130 } ;
@@ -220,7 +220,7 @@ export var provider: autocompleteplus.Provider = {
220220
221221 // Use the option if they have a preferred. Otherwise preserve
222222 quote = quote || groups [ 3 ] ;
223-
223+
224224 options . editor . replaceSelectedText ( null , function ( ) { return `${ leadingWhiteSpace } import ${ alias } = require(${ quote } ${ options . suggestion . atomTS_IsImport . relativePath } ${ quote } );` ; } ) ;
225225 }
226226 if ( options . suggestion . atomTS_IsES6Import ) {
0 commit comments