Closed pherrymason closed 3 months ago
In order to fix this locally I moved
state.SetCalculateDiagnostics(true)
inside of runDiagnostics to it's first line
though that lead to a regression in behaviour
Hi @pherrymason ! @joshring is right, since calculatingDiagnostics
is set when diagnostics is run, subsequent calls to diagnostics cannot override the previous one. Does this boolean flag make sense if debouncing is used?
You are both right, calculatingDiagnostics is causing the bad behaviour. I removed its usage completely as @nikpivkin is right, it might not be needed if I'm already using a debounce. Thank you!
By calling
c3c build --test
on the project, LSP could get some initial diagnostics showing compiler errors as the user modifies its project.c3c
:c3c-path
diagnostics-delay
Reference: https://github.com/c3lang/c3c/issues/1329