File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
packages/tailwindcss-language-server/tests Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -91,6 +91,18 @@ export async function init(
9191 projectDetails = project
9292 } )
9393
94+ // TODO: This shouldn't be needed
95+ // The server should either delay requests *or*
96+ // openDocument shouldn't return until the project its a part of has been
97+ // built otherwise all requests will return nothing and it's not something
98+ // we can await directly right now
99+ //
100+ // Like maybe documentReady should be delayed by project build state?
101+ // because otherwise the document isn't really ready anyway
102+ let projectBuilt = new Promise < void > ( ( resolve ) => {
103+ client . conn . onNotification ( '@/tailwindCSS/projectReloaded' , ( ) => resolve ( ) )
104+ } )
105+
94106 return {
95107 client,
96108 fixtureUri ( fixture : string ) {
@@ -130,6 +142,8 @@ export async function init(
130142 settings,
131143 } )
132144
145+ await projectBuilt
146+
133147 return {
134148 get uri ( ) {
135149 return doc . uri . toString ( )
You can’t perform that action at this time.
0 commit comments