initialize / shutdown / exit | — |
textDocument/didOpen/Change/Close/Save | incremental sync, in-memory doc store |
textDocument/publishDiagnostics | crystal build --no-codegen -f json, debounced, on-save by default |
textDocument/diagnostic (pull) | LSP 3.17 pull model; shares a cache with publishDiagnostics |
textDocument/hover | scanner + workspace index first, falls back to crystal tool context |
textDocument/definition | scanner-first (local bindings, unambiguous workspace hits), compiler next |
textDocument/declaration | alias of textDocument/definition |
textDocument/implementation | scanner-walks the workspace for concrete overrides (methods) or subclasses (types), compiler tool implementations first |
textDocument/typeDefinition | crystal tool context → workspace-index lookup of the resolved type |
textDocument/references | scanner-based workspace walk with @ivar / @@cvar / $global awareness |
textDocument/rename + prepareRename | scanner-based rewrite, token-range prepare |
textDocument/formatting | crystal tool format |
textDocument/rangeFormatting | full-document format, edits diffed to the requested range |
textDocument/onTypeFormatting | indent-aware newline handling |
textDocument/documentSymbol | scanner-based hierarchical outline |
textDocument/documentHighlight | scanner identifier matches |
textDocument/documentLink | require "…" lines, resolved against shard root and relative paths |
textDocument/completion + completionItem/resolve | keywords + pseudo-methods + scanner symbols; type-aware after .; snippet insertText for methods with required args; auto-require additionalTextEdits for cross-file classes; allCommitCharacters so ./(/[/, commit; LSP 3.17 labelDetails shows (args) : ReturnType in the popup |
textDocument/signatureHelp | nearest matching def, workspace fallback |
textDocument/inlayHint | inferred local-variable types (compiler) |
textDocument/semanticTokens/full + /range + /full/delta | scanner-based highlighting; delta responses diff the last payload for large files; declaration / readonly / defaultLibrary modifier bits emitted on name-tokens, constants, and curated stdlib types |
textDocument/publishDiagnostics tags | Unnecessary (dimmed) for unused-variable warnings, Deprecated (strikethrough) for @[Deprecated] calls |
textDocument/foldingRange | block-structured folds |
textDocument/selectionRange | scanner tree nesting plus word / line / document layers |
textDocument/codeAction | quick-fix auto-require for undefined constant / undefined method; source.fixAll bundles all auto-requires; source.organizeImports sorts + dedupes the leading require block (stdlib → shards → relative) |
textDocument/codeLens + codeLens/resolve | "N references" over every top-level def/class; ▶ Run over every it / describe / context in *_spec.cr, wired to the crystal.runSpec command |
textDocument/willSaveWaitUntil | opt-in via CRYSTAL_LANGUAGE_SERVER_WILL_SAVE_ACTIONS=organize_imports: runs organizeImports edits as the editor blocks for save |
textDocument/prepareCallHierarchy + incomingCalls + outgoingCalls | scanner-driven caller/callee graph |
textDocument/prepareTypeHierarchy + supertypes + subtypes | scanner-driven inheritance tree |
workspace/symbol | scanner over open docs + .cr files under the workspace root |