Skip to content

Commit effe793

Browse files
committed
Add todo
1 parent 531528b commit effe793

File tree

1 file changed

+12
-0
lines changed
  • packages/tailwindcss-language-server/src

1 file changed

+12
-0
lines changed

packages/tailwindcss-language-server/src/tw.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -941,6 +941,18 @@ export class TW {
941941

942942
this.lastTriggerCharacters = chars
943943

944+
// TODO: This might technically be a race condition if:
945+
// - There are multiple workspace roots
946+
// - There are multiple projects with different separators
947+
//
948+
// Everything up to this point is synchronous including the bailout code
949+
// so it *should* be fine
950+
//
951+
// The proper fix here is to:
952+
// - Refactor workspace folder initialization so discovery, initialization,
953+
// file events, config watchers, etc… are all shared.
954+
// - Remove the need for the "restart" concept in the server for as much as
955+
// possible. Each project should be capable of reloading its modules.
944956
this.completionRegistration?.dispose()
945957
this.completionRegistration = await this.connection.client.register(CompletionRequest.type, {
946958
documentSelector: null,

0 commit comments

Comments
 (0)