Skip to content

Commit 4fda6ed

Browse files
akoclaude
andcommitted
fix: enable LSP diagnostics for editable mendix-mdl:// documents
Remove the skip guards that suppressed parse diagnostics and semantic validation for mendix-mdl:// URIs. These were added when the documents were read-only but now that they are editable, users need error squiggles as they type. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent f3c2d46 commit 4fda6ed

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

cmd/mxcli/lsp_diagnostics.go

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -60,19 +60,6 @@ func parseMDLDiagnostics(text string) []protocol.Diagnostic {
6060

6161
// publishDiagnostics parses the document and sends diagnostics to the client.
6262
func (s *mdlServer) publishDiagnostics(ctx context.Context, docURI uri.URI, text string) {
63-
// Skip diagnostics for virtual documents (mendix-mdl:// scheme).
64-
// These are read-only DESCRIBE output (e.g. workflow pseudo-MDL) that
65-
// may not conform to the MDL grammar.
66-
uriStr := string(docURI)
67-
if strings.HasPrefix(uriStr, "mendix-mdl://") {
68-
// Clear any stale diagnostics
69-
s.client.PublishDiagnostics(ctx, &protocol.PublishDiagnosticsParams{
70-
URI: protocol.DocumentURI(docURI),
71-
Diagnostics: []protocol.Diagnostic{},
72-
})
73-
return
74-
}
75-
7663
diags := parseMDLDiagnostics(text)
7764
// If no parse errors, run semantic validation inline
7865
if len(diags) == 0 {
@@ -138,11 +125,6 @@ func (s *mdlServer) DidClose(ctx context.Context, params *protocol.DidCloseTextD
138125
func (s *mdlServer) DidSave(ctx context.Context, params *protocol.DidSaveTextDocumentParams) error {
139126
docURI := uri.URI(params.TextDocument.URI)
140127

141-
// Skip semantic checks for virtual documents (read-only DESCRIBE output)
142-
if strings.HasPrefix(string(docURI), "mendix-mdl://") {
143-
return nil
144-
}
145-
146128
s.mu.Lock()
147129
text := s.docs[docURI]
148130
s.mu.Unlock()

0 commit comments

Comments
 (0)