Skip to content

Commit bc7fa19

Browse files
committed
Add small timeout
1 parent 4f1bb74 commit bc7fa19

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

apps/lsp/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ connection.onInitialized(async () => {
225225
}
226226

227227
// listen for color theme changes from the client
228-
connection.onNotification("quarto/didChangeActiveColorTheme", (params: { kind: string }) => {
228+
connection.onNotification("quarto/didChangeActiveColorTheme", (params: { kind: string; }) => {
229229
logger.logNotification('didChangeActiveColorTheme');
230230
// Validate the theme kind before using it
231231
if (params.kind === "light" || params.kind === "dark") {

apps/vscode/src/lsp/client.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,9 @@ export async function activateLsp(
177177
if (e.newState === State.Running) {
178178
handler.dispose();
179179
// Send initial theme on startup
180-
sendThemeNotification();
180+
setTimeout(() => {
181+
sendThemeNotification();
182+
}, 50);
181183
resolve(client);
182184
} else if (e.newState === State.Stopped) {
183185
reject(new Error("Failed to start Quarto LSP Server"));

0 commit comments

Comments
 (0)