File tree Expand file tree Collapse file tree 2 files changed +23
-4
lines changed
tailwindcss-language-server/src Expand file tree Collapse file tree 2 files changed +23
-4
lines changed Original file line number Diff line number Diff line change @@ -629,7 +629,10 @@ export class TW {
629
629
this . getProject ( document )
630
630
?. provideAnnotations ( document )
631
631
. then ( ( annotations ) => {
632
- this . connection . sendRequest ( '@/tailwindCSS/annotations' , annotations )
632
+ this . connection . sendRequest ( '@/tailwindCSS/annotations' , {
633
+ uri : document . uri ,
634
+ annotations,
635
+ } )
633
636
} )
634
637
} ) ,
635
638
)
@@ -656,11 +659,25 @@ export class TW {
656
659
this . getProject ( document )
657
660
?. provideAnnotations ( document )
658
661
. then ( ( annotations ) => {
659
- this . connection . sendRequest ( '@/tailwindCSS/annotations' , annotations )
662
+ this . connection . sendRequest ( '@/tailwindCSS/annotations' , {
663
+ uri : document . uri ,
664
+ annotations,
665
+ } )
660
666
} )
661
667
} ) ,
662
668
)
663
669
670
+ this . documentService . getAllDocuments ( ) . forEach ( ( document ) => {
671
+ this . getProject ( document )
672
+ ?. provideAnnotations ( document )
673
+ . then ( ( annotations ) => {
674
+ this . connection . sendRequest ( '@/tailwindCSS/annotations' , {
675
+ uri : document . uri ,
676
+ annotations,
677
+ } )
678
+ } )
679
+ } )
680
+
664
681
if ( this . initializeParams . capabilities . workspace . workspaceFolders ) {
665
682
this . disposables . push (
666
683
this . connection . workspace . onDidChangeWorkspaceFolders ( async ( evt ) => {
Original file line number Diff line number Diff line change @@ -543,8 +543,10 @@ export async function activate(context: ExtensionContext) {
543
543
client . onNotification ( '@/tailwindCSS/projectInitialized' , updateActiveTextEditorContext )
544
544
client . onNotification ( '@/tailwindCSS/projectReset' , updateActiveTextEditorContext )
545
545
client . onNotification ( '@/tailwindCSS/projectsDestroyed' , resetActiveTextEditorContext )
546
- client . onRequest ( '@/tailwindCSS/annotations' , ( ranges ) => {
547
- Window . activeTextEditor . setDecorations ( underlineDecorationType , ranges )
546
+ client . onRequest ( '@/tailwindCSS/annotations' , ( { uri, annotations } ) => {
547
+ Window . visibleTextEditors
548
+ . find ( ( editor ) => editor . document . uri . toString ( ) === uri )
549
+ ?. setDecorations ( underlineDecorationType , annotations )
548
550
} )
549
551
client . onRequest ( '@/tailwindCSS/getDocumentSymbols' , showSymbols )
550
552
You can’t perform that action at this time.
0 commit comments