Skip to content

Map internal symbols to correct LSP symbol and completion kinds #4870

Description

@Widthdom

Summary

LSP kind mapping is incomplete: imports appear as Variable, while constructors appear as Function in both symbol and completion paths.

Audit IDs: G-24 and G-25. Reproduced with locally built cdidx v1.40.3 at 404db09489c305f17d94f37026e00564d3ac527a.

Existing issue relationship

Follow-up to closed #1762's SymbolKind mapping work.

Expected behavior and PR scope

One exhaustive, documented mapping should serve document/workspace symbols and completion, with deliberate fallbacks. This is one protocol-kind mapping/test-matrix PR.

Implementation guide for Codex 5.6 sol xhigh

  • Create a table from every internal symbol kind to LSP SymbolKind and CompletionItemKind.
  • Use Constructor for constructors and the correct namespace/module representation for imports under the supported protocol.
  • Cover classes, records, interfaces, enums/members, methods, properties, fields, events, parameters, aliases, namespaces, and unknown/plugin kinds.
  • Assert mappings from decoded protocol responses, not only helper return values.
  • Add focused regression/contract tests, run the full net8.0 and net9.0 suite, and add the required bilingual changelog.d/unreleased/ fragment.

Acceptance criteria

  • Imports no longer appear as variables.
  • Constructors use Constructor in navigation/symbol and completion contexts.
  • Every supported internal kind has tested, intentional mappings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    .NETPull requests that update .NET codebugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions