File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
vscode-ng-language-service/server/src Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -1403,7 +1403,24 @@ export class Session {
14031403 options ,
14041404 ) ;
14051405 if ( ! completions ) {
1406- return null ;
1406+ const sf = this . getDefaultProjectForScriptInfo ( scriptInfo ) ?. getSourceFile ( scriptInfo . path ) ;
1407+ if ( ! sf ) {
1408+ return null ;
1409+ }
1410+ const node = getTokenAtPosition ( sf , offset ) ;
1411+ if ( ! isInlineStyleNode ( node ) ) {
1412+ return null ;
1413+ }
1414+ const virtualScssDocContents = getSCSSVirtualContent ( sf ) ;
1415+ const virtualScssDoc = TextDocument . create (
1416+ params . textDocument . uri . toString ( ) ,
1417+ 'scss' ,
1418+ 0 ,
1419+ virtualScssDocContents ,
1420+ ) ;
1421+ const stylesheet = scssLS . parseStylesheet ( virtualScssDoc ) ;
1422+ const scssCompletions = scssLS . doComplete ( virtualScssDoc , params . position , stylesheet ) ;
1423+ return scssCompletions . items ;
14071424 }
14081425 return completions . entries . map ( ( e ) =>
14091426 tsCompletionEntryToLspCompletionItem ( e , params . position , scriptInfo ) ,
You can’t perform that action at this time.
0 commit comments