diff --git a/d2cli/main.go b/d2cli/main.go index 0f820ff9c..34ba5a717 100644 --- a/d2cli/main.go +++ b/d2cli/main.go @@ -457,11 +457,10 @@ func compile(ctx context.Context, ms *xmain.State, plugins []d2plugin.Plugin, fs } if os.Getenv("D2_LSP_MODE") == "1" { - // only the parse result is needed if running d2 for lsp + // only the parse result is needed if running d2 for lsp, + // if this, "fails", the AST is still valid and can be sent + // to vscode extention ast, err := d2lib.Parse(ctx, string(input), opts) - if err != nil { - return nil, false, err - } type LspOutputData struct { Ast *d2ast.Map