lsp,docs: definition uses .sgl source path; hover falls back to runtime spec
(sigil docs lookup) json->module-details was storing the .json doc path in module-details-file, so textDocument/definition resolved to non-existent files and always returned null. The compiler-emitted JSON carries a "source" field with the real .sgl path; use it and fall back to the doc path only when missing.
(sigil lsp hover) now consults runtime procedure metadata for the defining module when the sidecar description is empty. Procedure docstrings aren't stored at runtime today (both CPS paths treat %set-docstring! as a no-op — cps-convert.c:3604,3634), so this at least surfaces (spec ...) signatures on hover cards. Filling the description field will require either wiring doc text into doccollectionadd_export at compile time or making %set-docstring! actually stash strings somewhere reachable at runtime; both are separate follow-ups.
src/sigil/docs/lookup.sgl | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)src/sigil/docs/lookup.sglmodified
(let* ((exports-array (dict-ref json-doc exports: #f)) (exports (if exports-array (array->list exports-array) '()))) '())) ;; Prefer the absolute source path emitted by the compiler ;; (the "source" field); fall back to the doc path if missing. (source-file (let ((s (dict-ref json-doc source: #f))) (if (and s (string? s) (not (equal? s 'null))) s doc-path)))) (module-details name: module-name file: doc-path file: source-file package: (let ((pkg (dict-ref json-doc package: #f))) (if (and pkg (not (equal? pkg 'null))) pkg