Skip to content

Language Server — LSP scaffold + diagnostics #64

Description

@TomProkop

Summary

LSP server providing real-time diagnostics and navigation for Dataverse solution XML files in VS Code.

Scope

LSP server scaffold

  • New project TALXIS.Platform.Metadata.LanguageServer
  • LSP framework (OmniSharp or Microsoft.VisualStudio.LanguageServer.Protocol)
  • textDocument/didOpen, textDocument/didChange, textDocument/didClose
  • Workspace load at startup (via InMemoryContext)

Diagnostics

  • XSD validation errors → LSP diagnostics with source location
  • Duplicate GUID detection
  • Dangling references (control → non-existent attribute) → warning
  • Model-load errors from Workspace.LoadErrors
  • Leverage SourceLocation from core model for precise positions (line, column)

Completions

  • Entity logical names in lookups and references
  • Attribute logical names in datafieldname attributes
  • FormId / ViewId reference completions
  • OptionSet values
  • ClassId completions for control types

Go-to-definition

  • datafieldname → attribute definition in Entity.xml
  • Lookup reference → target entity
  • FormId reference → form file
  • OptionSet reference → definition

File watching + incremental reload

  • workspace/didChangeWatchedFiles handler
  • Incremental reload (only changed files)
  • InMemoryContext for fast model update
  • Invalidate diagnostics for changed files

VS Code extension

  • Extension manifest — language ID for .xml in Declarations/ context
  • LSP client configuration
  • Activation on Solution.xml detection

Depends on

Ref: docs/roadmap.md Milestone 7, docs/runtime-architecture.md.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions