Documentation

Lean.Server.FileWorker.Utils

Tracks diagnostics and incremental diagnostic reporting state for a single document version.

The sticky diagnostics are shared across all document versions via an IO.Ref, while per-version diagnostics are stored directly. The whole state is wrapped in a Std.Mutex on EditableDocumentCore to ensure atomic updates.

Instances For

    A document bundled with processing information. Turned into EditableDocument as soon as the reporter task has been started.

    Instances For

      Appends new non-sticky diagnostics.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For

        Appends a sticky diagnostic and marks the next publish as non-incremental. Removes any existing sticky diagnostic whose message.stripTags matches the new one.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For

          Returns all current diagnostics (sticky ++ doc).

          Equations
          Instances For

            Creates a new EditableDocumentCore for a new document version, sharing the same sticky diagnostics with the previous version.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For

              Collects diagnostics for a textDocument/publishDiagnostics notification, updates the incremental tracking fields and writes the notification to the client.

              When incrementalDiagnosticSupport is true and the state allows it, sends only the newly added diagnostics with isIncremental? := some true. Otherwise, sends all sticky and non-sticky diagnostics non-incrementally.

              The state update and the write are performed atomically under the diagnostics mutex to prevent reordering between concurrent publishers (the reporter task and the main thread).

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For

                EditableDocumentCore with reporter task.

                Instances For

                  Construct a VersionedTextDocumentIdentifier from an EditableDocument -

                  Equations
                  Instances For
                    Instances For
                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For
                        Equations
                        Instances For