Repository navigation
grund 0.11.0
Fixed
-
§FS-lsp.2.2 / §AR-lsp.2: nested and multi-root editor workspaces no longer silently hide citations outside the first folder (issue #126). LSP workspace folders are now config-discovery anchors: a nested IntelliJ project base resolves to its enclosing Grund project and scans the configured include roots, while independent initial folders keep separate snapshots so equal local IDs cannot bleed across projects. The server advertises workspace-folder support and applies later add/remove notifications, rebuilding and republishing diagnostics from the remaining folder set. PR #127
Multi-root discovery brought a second question with it — which of several projects answers for a document — and one resolution now settles it for every surface. A containing root claims the document, the deepest one where project trees nest; failing that, exactly one project whose scan actually read it claims it. Multiple independent projects that only scan the same external file leave it unowned rather than guessing by root depth. That scan fallback matters because a project's reach is not its root:
[scan] includeis a scan scope rather than a fence (§FS-config.3.5), so a symlinked include root canonicalizes outside the project directory and an include path may be parent-relative. Deciding ownership on the root prefix alone would have gone silent — no hover, definition, references, links, or shorthand expansion — on filesgrund checkreports on, which is the same class of hidden citation as #126.LspSnapshottherefore carriesscanned_files, the set its scan read. Because at most one project owns a document, diagnostics are published by that owner alone: a file two overlapping editor folders both scan — an enclosing workspace and one of its members, say — no longer collects each finding twice, nor the two projects' disagreeing readings of one citation side by side.A folder that cannot become a project no longer takes the session with it (§REQ-never-crashes). A folder URI with a non-
file:scheme — editors mix virtual and remote folders into one window, and only the first folder used to be read at all — is skipped with a note on stderr instead of abortinginitializebefore the client gets an answer. A folder whosegrund.tomlwill not load is skipped the same way: previously one half-typed config failed the whole batch, so at startup no folder got a server, and mid-session the error reached only stderr while every project quietly kept serving its pre-edit snapshot. Each project is now built on its own and keeps its last good snapshot when its own scan fails. In the same pass, an edit re-scans only the projects that can see the edited document, so the per-keystroke cost tracks the edited project rather than the number of open folders; watched-file creates and deletes still rebuild everything, since a path no project has read belongs to none of them.