Skip to content

Support suggestions in VS Code diff comments

Problem to solve

GitLab supports a custom suggestion Markdown code blocks

```suggestion:-0+0
suggested text
```

Which gets rendered on the web as

Update_new-file2_txt___9____Merge_requests___Tomas_Vik___test_project___GitLab

but in VS Code it renders as a generic text block:

Extension_Development_Host_-_new-file2_txt___9____test-project

Proposal

Implement a post-processing of comments in VS Code to convert the custom suggestion into a diff block:

```suggestion:-1+0
,--,
```

changes to

Suggestion:

```diff
- 
- ,,,
+ ,--,
```

rendered as

Extension_Development_Host_-_new-file2_txt___9____test-project

Further details

  • This would be quite complex because as seen in the previous example, suggestion can span multiple lines (suggestion:-1+0) and so the logic would have to work not only on comments but also access the text file to have the full context.

Links / references

Edited by Tomas Vik (OOO back on 2025-07-02)