How to render my own view inside of codemirror 6 or customize cm6's view

I am using the diff-match-patch library to implement the diff view. using the result of diff-match-patch I have implemented a diff view. but how to render inside the code mirror 6 views or customize. and how to get added lines number from the code mirror for my own view .? please help me,