Skip to content

Completion: offer library/class names on bare-prefix via the StructureDeclarationIndexer (not only on dot-access) #371

Description

@msarson

Summary

Library / ABC / third-party symbols (StringTheory, NetTalk, ABC classes, etc.) complete on member access (instance.member, via the StructureDeclarationIndexer since v0.9.2) but are not offered as bare-prefix identifiers. Bare-prefix completion (WordCompletionProvider.provide, WordCompletionProvider.ts:53) never consults the declaration indexer or libsrc — a name only appears if it was tokenized in the current file or the PROGRAM file.

Impact

Typing a library class/proc name (not after a dot) yields nothing from the server, so the developer can't complete e.g. a StringTheory type name or a global ABC symbol unless it already appears in the buffer. ClarionAssistant fills this today from its ClarionGraph library index (audit cat 1 — a "CA must keep" precisely because the server doesn't cover it). Serving it server-side would remove that duplication and help every LSP client.

Ask

Feed the StructureDeclarationIndexer (the same source that powers member-access resolution) into bare-prefix completion: offer library/class/interface names + their equates as identifier completions when a solution + redirection file is loaded. Dedupe against the existing word/token results.

Context

From a ground-truth completion audit comparing the LSP against CA's CodeGraph merges (cat 1). Sibling fix: resolve member access at letter-ending positions (cat 8). Both aim to reduce CA↔LSP completion duplication.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions