# logicaffeine_lsp > The LOGOS language server (LSP): diagnostics, completion, hover, navigation and refactoring for .lg files, literate .md files and LGX pages Every public module and item of `logicaffeine_lsp`, module by module, each with its one-line summary and its address. Item pages hold the full signature, documentation, trait implementations and a link to the source. - Crate page: [logicaffeine_lsp](https://docs.logicaffeine.com/logicaffeine_lsp/) - All items on one page: [logicaffeine_lsp/all](https://docs.logicaffeine.com/logicaffeine_lsp/all) - Source: [src/logicaffeine_lsp/lib.rs](https://docs.logicaffeine.com/src/logicaffeine_lsp/lib.rs) - Every crate: [llms.txt](https://docs.logicaffeine.com/llms.txt) ## logicaffeine_lsp - [mod call_hierarchy](https://docs.logicaffeine.com/logicaffeine_lsp/call_hierarchy/): Call hierarchy over the `SymbolIndex`’s call sites: who calls this function, and what does it call. `## Main` callers have no hierarchy item (Main is the program, not a function) — their calls simply don’t appear as incoming edges. - [mod code_actions](https://docs.logicaffeine.com/logicaffeine_lsp/code_actions/) - [mod code_lens](https://docs.logicaffeine.com/logicaffeine_lsp/code_lens/) - [mod completion](https://docs.logicaffeine.com/logicaffeine_lsp/completion/) - [mod definition](https://docs.logicaffeine.com/logicaffeine_lsp/definition/) - [mod diagnostics](https://docs.logicaffeine.com/logicaffeine_lsp/diagnostics/) - [mod document](https://docs.logicaffeine.com/logicaffeine_lsp/document/) - [mod document_highlights](https://docs.logicaffeine.com/logicaffeine_lsp/document_highlights/): Document highlights: every occurrence of the symbol under the cursor, with WRITE kind on binding and mutation sites and READ everywhere else — the cursor-hold highlight editors render natively. - [mod document_symbols](https://docs.logicaffeine.com/logicaffeine_lsp/document_symbols/) - [mod flycheck](https://docs.logicaffeine.com/logicaffeine_lsp/flycheck/): The rustc flycheck: on save, compile the document through the AOT backend’s mapped codegen and run `cargo check` over it, translating every finding back to English with real user-source spans — the borrow checker, speaking LOGOS. - [mod folding](https://docs.logicaffeine.com/logicaffeine_lsp/folding/) - [mod formatting](https://docs.logicaffeine.com/logicaffeine_lsp/formatting/) - [mod hover](https://docs.logicaffeine.com/logicaffeine_lsp/hover/) - [mod index](https://docs.logicaffeine.com/logicaffeine_lsp/index/) - [mod inlay_hints](https://docs.logicaffeine.com/logicaffeine_lsp/inlay_hints/) - [mod line_index](https://docs.logicaffeine.com/logicaffeine_lsp/line_index/) - [mod pipeline](https://docs.logicaffeine.com/logicaffeine_lsp/pipeline/) - [mod references](https://docs.logicaffeine.com/logicaffeine_lsp/references/) - [mod rename](https://docs.logicaffeine.com/logicaffeine_lsp/rename/) - [mod scheduler](https://docs.logicaffeine.com/logicaffeine_lsp/scheduler/) - [mod selection_ranges](https://docs.logicaffeine.com/logicaffeine_lsp/selection_ranges/): Selection ranges: expand-selection follows English structure — word → sentence → block → document. - [mod semantic_tokens](https://docs.logicaffeine.com/logicaffeine_lsp/semantic_tokens/) - [mod server](https://docs.logicaffeine.com/logicaffeine_lsp/server/) - [mod signature_help](https://docs.logicaffeine.com/logicaffeine_lsp/signature_help/) - [mod state](https://docs.logicaffeine.com/logicaffeine_lsp/state/) - [mod stdlib_docs](https://docs.logicaffeine.com/logicaffeine_lsp/stdlib_docs/): The stdlib teaching registry: every prelude definition’s literate documentation, read once from the RAW embedded module sources (`loader::prelude_module_sources` — Notes included) through `teach::extract_literate_docs`. Hover, completion, and signature help fall back here when a name has no local definition, so `md5` teaches in the editor exactly what its `## Note` says in the source. - [mod teach_md](https://docs.logicaffeine.com/logicaffeine_lsp/teach_md/): Markdown rendering for the shared teaching brain (`logicaffeine_language::teach`) — the LSP’s presentation of a lesson. - [mod template](https://docs.logicaffeine.com/logicaffeine_lsp/template/): The LGX template vocabulary the editor completes and paints with. - [mod workspace](https://docs.logicaffeine.com/logicaffeine_lsp/workspace/): Workspace-wide symbol index: every `.lg`/`.md` file under the workspace folders, analyzed in the background, so symbols resolve across files the user never opened. ## logicaffeine_lsp::call_hierarchy Call hierarchy over the `SymbolIndex`’s call sites: who calls this function, and what does it call. `## Main` callers have no hierarchy item (Main is the program, not a function) — their calls simply don’t appear as incoming edges. - [fn incoming_calls](https://docs.logicaffeine.com/logicaffeine_lsp/call_hierarchy/fn.incoming_calls) - [fn outgoing_calls](https://docs.logicaffeine.com/logicaffeine_lsp/call_hierarchy/fn.outgoing_calls) - [fn prepare](https://docs.logicaffeine.com/logicaffeine_lsp/call_hierarchy/fn.prepare) ## logicaffeine_lsp::code_actions - [fn code_actions](https://docs.logicaffeine.com/logicaffeine_lsp/code_actions/fn.code_actions): Handle code action request. - [fn import_code_actions](https://docs.logicaffeine.com/logicaffeine_lsp/code_actions/fn.import_code_actions): AUTO-IMPORT quickfixes: for each unresolved reference in `range` that some project module publicly exports but this file does NOT import, offer an `Import .` action whose single edit inserts the statement in the right place (after existing imports, else before the first `## ` block). An ambiguous name (exported by several modules) offers one action per module. THE lever — the compiler error becomes a one-click fix before a build is ever run. - [fn unused_import_actions](https://docs.logicaffeine.com/logicaffeine_lsp/code_actions/fn.unused_import_actions): “Remove unused import” quickfixes: an `Import X.` whose module’s names are never referenced in this file. The editor complement of the `largo check` unused-import warning — a one-click removal. ## logicaffeine_lsp::code_lens - [fn code_lenses](https://docs.logicaffeine.com/logicaffeine_lsp/code_lens/fn.code_lenses): Handle code lens request. ## logicaffeine_lsp::completion - [fn completions](https://docs.logicaffeine.com/logicaffeine_lsp/completion/fn.completions): Handle completion request. - [fn completions_with_workspace](https://docs.logicaffeine.com/logicaffeine_lsp/completion/fn.completions_with_workspace): `completions` enriched with cross-module knowledge from the workspace: after `Import `, the available module NAMES; in code, the public SYMBOLS of the modules this file imports (each labelled `from `). Additive — never displaces the local + stdlib completions. ## logicaffeine_lsp::definition - [fn goto_definition](https://docs.logicaffeine.com/logicaffeine_lsp/definition/fn.goto_definition): Handle go-to-definition request. ## logicaffeine_lsp::diagnostics - [struct ErrorDecision](https://docs.logicaffeine.com/logicaffeine_lsp/diagnostics/struct.ErrorDecision): The explicit presentation decision for one `ParseErrorKind`. - [enum DocsLink](https://docs.logicaffeine.com/logicaffeine_lsp/diagnostics/enum.DocsLink): Whether a diagnostic carries a “read more” link into LOGOS_QUICKGUIDE.md. - [enum Quickfix](https://docs.logicaffeine.com/logicaffeine_lsp/diagnostics/enum.Quickfix): Whether `code_actions` offers a mechanical fix for an error kind. - [const ANALYSIS_DECISIONS](https://docs.logicaffeine.com/logicaffeine_lsp/diagnostics/constant.ANALYSIS_DECISIONS): The severity contract for the analysis-layer hint/warning codes — one row per emitted code, locked (both directions) by `tests/locks.rs`. - [const REFUSAL_CODE](https://docs.logicaffeine.com/logicaffeine_lsp/diagnostics/constant.REFUSAL_CODE): The diagnostic code of a browser-tier refusal. - [fn convert_analysis_errors](https://docs.logicaffeine.com/logicaffeine_lsp/diagnostics/fn.convert_analysis_errors): Convert analysis errors (escape/ownership) to LSP diagnostics. - [fn convert_errors](https://docs.logicaffeine.com/logicaffeine_lsp/diagnostics/fn.convert_errors): Convert a list of parse errors to LSP diagnostics. - [fn copy_finding_code](https://docs.logicaffeine.com/logicaffeine_lsp/diagnostics/fn.copy_finding_code): `copy-` and the kind’s variant name in kebab case: `OrphanedCopy` → `copy-orphaned-copy` — mirrors `lgx_finding_code`’s own convention for its own, separate finding type. - [fn copy_finding_diagnostics](https://docs.logicaffeine.com/logicaffeine_lsp/diagnostics/fn.copy_finding_diagnostics): The value-semantics copy lint’s findings, as the editor shows them — same treatment `lgx_finding_diagnostics` gives its own, separate finding type: at the mutation the lint is about, with its own severity and message. - [fn decision_for](https://docs.logicaffeine.com/logicaffeine_lsp/diagnostics/fn.decision_for) - [fn lgx_finding_code](https://docs.logicaffeine.com/logicaffeine_lsp/diagnostics/fn.lgx_finding_code): `lgx-` and the kind’s variant name in kebab case: `ImageWithoutAlt` → `lgx-image-without-alt`. - [fn lgx_finding_diagnostics](https://docs.logicaffeine.com/logicaffeine_lsp/diagnostics/fn.lgx_finding_diagnostics): The LGX template checker’s findings, as the editor shows them: at the element they are about, with the checker’s own severity and message. - [fn refusal_diagnostics](https://docs.logicaffeine.com/logicaffeine_lsp/diagnostics/fn.refusal_diagnostics): The browser build’s refusals, at the construct each refuses. - [fn shadowing_warnings](https://docs.logicaffeine.com/logicaffeine_lsp/diagnostics/fn.shadowing_warnings): Warnings for re-declared names: a second `Let x` in the same block makes the earlier `x` unreachable from that point on — legal, and usually a misspelled `Set`. - [fn unused_function_hints](https://docs.logicaffeine.com/logicaffeine_lsp/diagnostics/fn.unused_function_hints): Hints for functions nothing calls — only in programs WITH a `## Main` (a library file’s functions are its API, not dead code). - [fn unused_variable_hints](https://docs.logicaffeine.com/logicaffeine_lsp/diagnostics/fn.unused_variable_hints): Hints for `Let` bindings nothing ever reads. ## logicaffeine_lsp::document - [struct DocumentState](https://docs.logicaffeine.com/logicaffeine_lsp/document/struct.DocumentState) - [fn apply_content_change](https://docs.logicaffeine.com/logicaffeine_lsp/document/fn.apply_content_change): Apply one LSP content change to a document’s text. - [fn name_at](https://docs.logicaffeine.com/logicaffeine_lsp/document/fn.name_at): Per-document state: source text, analysis results, and cached diagnostics. The NAME under the cursor, and where it is written. ## logicaffeine_lsp::document_highlights Document highlights: every occurrence of the symbol under the cursor, with WRITE kind on binding and mutation sites and READ everywhere else — the cursor-hold highlight editors render natively. - [fn document_highlights](https://docs.logicaffeine.com/logicaffeine_lsp/document_highlights/fn.document_highlights) ## logicaffeine_lsp::document_symbols - [fn document_symbols](https://docs.logicaffeine.com/logicaffeine_lsp/document_symbols/fn.document_symbols) ## logicaffeine_lsp::flycheck The rustc flycheck: on save, compile the document through the AOT backend’s mapped codegen and run `cargo check` over it, translating every finding back to English with real user-source spans — the borrow checker, speaking LOGOS. - [struct CargoFlycheck](https://docs.logicaffeine.com/logicaffeine_lsp/flycheck/struct.CargoFlycheck): Shells out to `cargo check` through `logicaffeine_compile::compile::rustc_check`, one persistent cache directory per workspace (warm incremental runs), single-flight per workspace so two saves never race one cargo target dir. - [struct Flycheck](https://docs.logicaffeine.com/logicaffeine_lsp/flycheck/struct.Flycheck): Per-document flycheck state: save generations and the last published findings (already converted to diagnostics against the checked text). - [struct FlycheckFinding](https://docs.logicaffeine.com/logicaffeine_lsp/flycheck/struct.FlycheckFinding): One translated rustc finding. - [const FLYCHECK_SOURCE](https://docs.logicaffeine.com/logicaffeine_lsp/flycheck/constant.FLYCHECK_SOURCE): The diagnostic source label — distinct from interactive `logicaffeine` diagnostics so editors and users can tell the two engines apart. - [trait FlycheckRunner](https://docs.logicaffeine.com/logicaffeine_lsp/flycheck/trait.FlycheckRunner): The check engine seam. The real runner shells out to cargo; tests inject mocks so the server’s merge/staleness/dedup behavior is provable without a toolchain. ## logicaffeine_lsp::folding - [fn folding_ranges](https://docs.logicaffeine.com/logicaffeine_lsp/folding/fn.folding_ranges): Handle folding range request. ## logicaffeine_lsp::formatting - [fn format_document](https://docs.logicaffeine.com/logicaffeine_lsp/formatting/fn.format_document): Handle document formatting request. - [fn format_range](https://docs.logicaffeine.com/logicaffeine_lsp/formatting/fn.format_range): Range formatting: the whole-document structural format (a line’s depth depends on the lines above it — depth is a document-level fact), filtered to the edits whose lines intersect the requested range. Sound because `format_source` is line-count preserving: every edit stays on its line. ## logicaffeine_lsp::hover - [fn format_field_type](https://docs.logicaffeine.com/logicaffeine_lsp/hover/fn.format_field_type) - [fn hover](https://docs.logicaffeine.com/logicaffeine_lsp/hover/fn.hover): Handle hover request. - [fn hover_with_workspace](https://docs.logicaffeine.com/logicaffeine_lsp/hover/fn.hover_with_workspace): `hover` enriched with cross-file module attribution: when the name under the cursor is defined in another project module, append “Defined in module X”. - [fn module_attribution](https://docs.logicaffeine.com/logicaffeine_lsp/hover/fn.module_attribution): “Defined in module `util.lg`” for a cross-file name — a name NOT defined in this document and NOT a stdlib name, but publicly exported by some project module. Returns `None` for local/stdlib names (they have their own hover). ## logicaffeine_lsp::index - [struct CallSite](https://docs.logicaffeine.com/logicaffeine_lsp/index/struct.CallSite): One function call site, for the call hierarchy. - [struct Definition](https://docs.logicaffeine.com/logicaffeine_lsp/index/struct.Definition): A definition in the document (variable, function, struct, enum, field, etc.) - [struct Reference](https://docs.logicaffeine.com/logicaffeine_lsp/index/struct.Reference): A reference to a definition. - [struct ScopeInfo](https://docs.logicaffeine.com/logicaffeine_lsp/index/struct.ScopeInfo): Scope context for a definition — which block contains it and at what depth. - [struct SymbolIndex](https://docs.logicaffeine.com/logicaffeine_lsp/index/struct.SymbolIndex): The symbol index for a single document. - [enum DefinitionKind](https://docs.logicaffeine.com/logicaffeine_lsp/index/enum.DefinitionKind) - [fn find_cause_keyword_span](https://docs.logicaffeine.com/logicaffeine_lsp/index/fn.find_cause_keyword_span): `find_keyword_span_before_name` bounded to causes before a use site. - [fn find_keyword_span_before_name](https://docs.logicaffeine.com/logicaffeine_lsp/index/fn.find_keyword_span_before_name): Find the span of the keyword statement (Give, Zone, …) that CAUSED an error on `variable_name`. Used for diagnostic related-information. - [fn find_last_token_span_for_name](https://docs.logicaffeine.com/logicaffeine_lsp/index/fn.find_last_token_span_for_name): The LAST occurrence of a name — the use-site approximation for use-after-move/escape diagnostics when no statement span is known (the complaint is always about a later use, never the binding itself). - [fn find_token_span_for_name_pub](https://docs.logicaffeine.com/logicaffeine_lsp/index/fn.find_token_span_for_name_pub): Public version of `find_token_span_for_name` for use by other LSP modules. - [fn resolve_token_name](https://docs.logicaffeine.com/logicaffeine_lsp/index/fn.resolve_token_name): Resolve the user-visible name from a token, if it carries one. ## logicaffeine_lsp::inlay_hints - [fn inlay_hints](https://docs.logicaffeine.com/logicaffeine_lsp/inlay_hints/fn.inlay_hints): Handle inlay hints request. ## logicaffeine_lsp::line_index - [struct LineIndex](https://docs.logicaffeine.com/logicaffeine_lsp/line_index/struct.LineIndex): Maps between byte offsets and LSP `Position` (line, character). ## logicaffeine_lsp::pipeline - [struct AnalysisError](https://docs.logicaffeine.com/logicaffeine_lsp/pipeline/struct.AnalysisError): A lightweight owned analysis error from escape/ownership checking. - [struct AnalysisResult](https://docs.logicaffeine.com/logicaffeine_lsp/pipeline/struct.AnalysisResult): Result of running the full analysis pipeline on a document. - [enum OwnedStmt](https://docs.logicaffeine.com/logicaffeine_lsp/pipeline/enum.OwnedStmt): Lightweight summary of a statement for symbol indexing. This avoids lifetime issues with arena-allocated AST nodes. - [fn analyze](https://docs.logicaffeine.com/logicaffeine_lsp/pipeline/fn.analyze) ## logicaffeine_lsp::references - [fn cross_file_candidates](https://docs.logicaffeine.com/logicaffeine_lsp/references/fn.cross_file_candidates): The occurrences of `name` in ANOTHER open document that belong to a cross-file symbol: unresolved locally (they reach across files), or any occurrence when this document itself defines the symbol. Definition spans ride along when `include_defs` (rename edits the definition too). - [fn find_references](https://docs.logicaffeine.com/logicaffeine_lsp/references/fn.find_references): Handle find-all-references request. - [fn is_cross_file_symbol](https://docs.logicaffeine.com/logicaffeine_lsp/references/fn.is_cross_file_symbol): Is `name` a symbol other files can see from THIS document’s point of view? True when the document doesn’t define it (the usage reaches across files) or defines it as API shape. A local `Let x` is nobody’s business. - [fn name_at](https://docs.logicaffeine.com/logicaffeine_lsp/references/fn.name_at): The name under the cursor, exactly as the reference machinery reads it. ## logicaffeine_lsp::rename - [fn prepare_rename](https://docs.logicaffeine.com/logicaffeine_lsp/rename/fn.prepare_rename): Handle prepare rename request. - [fn rename](https://docs.logicaffeine.com/logicaffeine_lsp/rename/fn.rename): Handle rename request. - [fn validate_new_name](https://docs.logicaffeine.com/logicaffeine_lsp/rename/fn.validate_new_name): Validate a proposed new name for a rename operation. Returns an error message if invalid, None if valid. ## logicaffeine_lsp::scheduler - [struct Scheduler](https://docs.logicaffeine.com/logicaffeine_lsp/scheduler/struct.Scheduler): The live (pre-analysis) text of every open document, with a generation counter per document. - [const DEBOUNCE](https://docs.logicaffeine.com/logicaffeine_lsp/scheduler/constant.DEBOUNCE): How long after the last keystroke analysis runs. A typing burst coalesces into one pass over the final text; a single edit still feels instant because publish follows the window immediately. ## logicaffeine_lsp::selection_ranges Selection ranges: expand-selection follows English structure — word → sentence → block → document. - [fn selection_ranges](https://docs.logicaffeine.com/logicaffeine_lsp/selection_ranges/fn.selection_ranges) ## logicaffeine_lsp::semantic_tokens - [const MOD_DECLARATION](https://docs.logicaffeine.com/logicaffeine_lsp/semantic_tokens/constant.MOD_DECLARATION) - [const MOD_DEFAULT_LIBRARY](https://docs.logicaffeine.com/logicaffeine_lsp/semantic_tokens/constant.MOD_DEFAULT_LIBRARY) - [const MOD_MODIFICATION](https://docs.logicaffeine.com/logicaffeine_lsp/semantic_tokens/constant.MOD_MODIFICATION) - [const MOD_READONLY](https://docs.logicaffeine.com/logicaffeine_lsp/semantic_tokens/constant.MOD_READONLY) - [const TOKEN_MODIFIERS](https://docs.logicaffeine.com/logicaffeine_lsp/semantic_tokens/constant.TOKEN_MODIFIERS) - [const TOKEN_TYPES](https://docs.logicaffeine.com/logicaffeine_lsp/semantic_tokens/constant.TOKEN_TYPES): Our semantic token types, registered with the client. The legend is APPEND-ONLY — indices are a wire contract with client themes (pinned by `tests/locks.rs`). - [const TYPE_ATTRIBUTE](https://docs.logicaffeine.com/logicaffeine_lsp/semantic_tokens/constant.TYPE_ATTRIBUTE) - [const TYPE_COMMENT](https://docs.logicaffeine.com/logicaffeine_lsp/semantic_tokens/constant.TYPE_COMMENT) - [const TYPE_ENUM_MEMBER](https://docs.logicaffeine.com/logicaffeine_lsp/semantic_tokens/constant.TYPE_ENUM_MEMBER) - [const TYPE_FUNCTION](https://docs.logicaffeine.com/logicaffeine_lsp/semantic_tokens/constant.TYPE_FUNCTION) - [const TYPE_KEYWORD](https://docs.logicaffeine.com/logicaffeine_lsp/semantic_tokens/constant.TYPE_KEYWORD) - [const TYPE_MODIFIER](https://docs.logicaffeine.com/logicaffeine_lsp/semantic_tokens/constant.TYPE_MODIFIER) - [const TYPE_NAMESPACE](https://docs.logicaffeine.com/logicaffeine_lsp/semantic_tokens/constant.TYPE_NAMESPACE) - [const TYPE_NUMBER](https://docs.logicaffeine.com/logicaffeine_lsp/semantic_tokens/constant.TYPE_NUMBER) - [const TYPE_OPERATOR](https://docs.logicaffeine.com/logicaffeine_lsp/semantic_tokens/constant.TYPE_OPERATOR) - [const TYPE_PARAMETER](https://docs.logicaffeine.com/logicaffeine_lsp/semantic_tokens/constant.TYPE_PARAMETER) - [const TYPE_PROPERTY](https://docs.logicaffeine.com/logicaffeine_lsp/semantic_tokens/constant.TYPE_PROPERTY) - [const TYPE_STRING](https://docs.logicaffeine.com/logicaffeine_lsp/semantic_tokens/constant.TYPE_STRING) - [const TYPE_TAG](https://docs.logicaffeine.com/logicaffeine_lsp/semantic_tokens/constant.TYPE_TAG) - [const TYPE_TYPE](https://docs.logicaffeine.com/logicaffeine_lsp/semantic_tokens/constant.TYPE_TYPE) - [const TYPE_VARIABLE](https://docs.logicaffeine.com/logicaffeine_lsp/semantic_tokens/constant.TYPE_VARIABLE) - [fn classify_token](https://docs.logicaffeine.com/logicaffeine_lsp/semantic_tokens/fn.classify_token): Map a `TokenType` to a semantic token type index and modifier bitset. - [fn encode_document_tokens](https://docs.logicaffeine.com/logicaffeine_lsp/semantic_tokens/fn.encode_document_tokens): Encode a document’s tokens with the full resolution overlay. - [fn encode_document_tokens_in_range](https://docs.logicaffeine.com/logicaffeine_lsp/semantic_tokens/fn.encode_document_tokens_in_range): Resolution-aware encoding restricted to tokens overlapping a byte range. The first emitted token stays absolute from the document start, exactly as the LSP range response requires. - [fn encode_tokens](https://docs.logicaffeine.com/logicaffeine_lsp/semantic_tokens/fn.encode_tokens): Convert a token stream to LSP semantic tokens (delta-encoded) using the base part-of-speech layer only. `encode_document_tokens` is the resolution-aware entry point. - [fn find_mutation_targets](https://docs.logicaffeine.com/logicaffeine_lsp/semantic_tokens/fn.find_mutation_targets): Span starts of tokens that a statement WRITES: `Set to …` / `Set … at to …`-style targets take the identifier nearest the write (the last one before `to`, or before `at` when a keyed write follows), `Increase`/`Decrease `, `Push`/`Add`/`Append … to `, `Remove`/`Pop … from `. - [fn legend](https://docs.logicaffeine.com/logicaffeine_lsp/semantic_tokens/fn.legend) - [fn semantic_token_edits](https://docs.logicaffeine.com/logicaffeine_lsp/semantic_tokens/fn.semantic_token_edits): The minimal single-splice edit list turning `prev` into `next`. - [fn semantic_type_for](https://docs.logicaffeine.com/logicaffeine_lsp/semantic_tokens/fn.semantic_type_for): The semantic token type an identifier gets once resolution names its kind. Wildcard-free: a new `DefinitionKind` must decide its color here. ## logicaffeine_lsp::server - [struct LogicAffeineServer](https://docs.logicaffeine.com/logicaffeine_lsp/server/struct.LogicAffeineServer) ## logicaffeine_lsp::signature_help - [fn signature_help](https://docs.logicaffeine.com/logicaffeine_lsp/signature_help/fn.signature_help): Handle signature help request. ## logicaffeine_lsp::state - [struct ServerState](https://docs.logicaffeine.com/logicaffeine_lsp/state/struct.ServerState): Global server state: the latest analyzed snapshot of every open document. ## logicaffeine_lsp::stdlib_docs The stdlib teaching registry: every prelude definition’s literate documentation, read once from the RAW embedded module sources (`loader::prelude_module_sources` — Notes included) through `teach::extract_literate_docs`. Hover, completion, and signature help fall back here when a name has no local definition, so `md5` teaches in the editor exactly what its `## Note` says in the source. - [struct StdlibDoc](https://docs.logicaffeine.com/logicaffeine_lsp/stdlib_docs/struct.StdlibDoc): One stdlib definition’s teaching surface. - [fn all](https://docs.logicaffeine.com/logicaffeine_lsp/stdlib_docs/fn.all): Every stdlib name with its doc, name-sorted (completion feed). - [fn hover_md](https://docs.logicaffeine.com/logicaffeine_lsp/stdlib_docs/fn.hover_md): Hover markdown for a stdlib name: the signature as code, then the prose. - [fn stdlib_doc](https://docs.logicaffeine.com/logicaffeine_lsp/stdlib_docs/fn.stdlib_doc): The teaching surface for a stdlib prelude name, if it is one. ## logicaffeine_lsp::teach_md Markdown rendering for the shared teaching brain (`logicaffeine_language::teach`) — the LSP’s presentation of a lesson. - [fn block_hover_md](https://docs.logicaffeine.com/logicaffeine_lsp/teach_md/fn.block_hover_md): The lesson for a `##` block header, keeping the Block Header banner. - [fn completion_docs](https://docs.logicaffeine.com/logicaffeine_lsp/teach_md/fn.completion_docs): The lesson as completion-item documentation (same rendering as hover — the editor’s docs panel and the hover card always agree). - [fn guide_url](https://docs.logicaffeine.com/logicaffeine_lsp/teach_md/fn.guide_url): The canonical “read more” URL for a quickguide heading slug. - [fn keyword_hover_md](https://docs.logicaffeine.com/logicaffeine_lsp/teach_md/fn.keyword_hover_md): The full lesson as hover markdown: name, one plain sentence, the runnable example, the socratic question or tip, and the guide link when one fits. ## logicaffeine_lsp::template The LGX template vocabulary the editor completes and paints with. - [const FOR_EACH_CLAUSES](https://docs.logicaffeine.com/logicaffeine_lsp/template/constant.FOR_EACH_CLAUSES): The clause words a `{for each …:}` tag carries after its pattern. - [const TAGS](https://docs.logicaffeine.com/logicaffeine_lsp/template/constant.TAGS): Every template tag: the phrase that opens it, and its shape as `MalformedTag` spells it. - [fn filter_pipes](https://docs.logicaffeine.com/logicaffeine_lsp/template/fn.filter_pipes): The byte ranges of `text`’s top-level `|` separators — the filter pipes of a hole. A `|` inside a string or a bracketed group is part of an expression, not a pipe. - [fn is_comment](https://docs.logicaffeine.com/logicaffeine_lsp/template/fn.is_comment): A `{# … #}` template comment. - [fn tag_phrase](https://docs.logicaffeine.com/logicaffeine_lsp/template/fn.tag_phrase): The tag phrase `inner` (a `{…}` group’s text, braces excluded) opens with, and the byte length of the phrase within `inner` including any leading whitespace — `None` for a hole. ## logicaffeine_lsp::workspace Workspace-wide symbol index: every `.lg`/`.md` file under the workspace folders, analyzed in the background, so symbols resolve across files the user never opened. - [struct FileReference](https://docs.logicaffeine.com/logicaffeine_lsp/workspace/struct.FileReference): One name occurrence in a file, for cross-file references and rename. - [struct ModuleExport](https://docs.logicaffeine.com/logicaffeine_lsp/workspace/struct.ModuleExport): A module that publicly exports a given name — the backbone of the auto-import quickfix, cross-module completion, and “defined in module X” hover. - [struct WorkspaceIndex](https://docs.logicaffeine.com/logicaffeine_lsp/workspace/struct.WorkspaceIndex) - [struct WorkspaceSymbol](https://docs.logicaffeine.com/logicaffeine_lsp/workspace/struct.WorkspaceSymbol) - [trait WorkspaceView](https://docs.logicaffeine.com/logicaffeine_lsp/workspace/trait.WorkspaceView): Read-only view of the workspace’s imports/exports, so LSP providers (auto-import, completion, hover) are unit-testable against a fake without a running server. - [fn module_alias_from_url](https://docs.logicaffeine.com/logicaffeine_lsp/workspace/fn.module_alias_from_url): Derive a module’s import alias from its file path (`geometry.lg` → `Geometry`). - [fn path_url](https://docs.logicaffeine.com/logicaffeine_lsp/workspace/fn.path_url): The `file://` URL for a filesystem path — `None` where there is no filesystem. - [fn url_path](https://docs.logicaffeine.com/logicaffeine_lsp/workspace/fn.url_path): The filesystem path a `file://` URL names. `None` for any other URL, and always on a target with no filesystem — the browser Studio, which has no workspace on disk.