I'm trying to write a matrix with dots in it using the nicematrix package. I'm struggling to get the dots in the right place. My current best attempt looks like this:
The lower triangle of the matrix consists of zeros, which are nicely connected by dots to make a triangle. The diagonal is filled with the term CA^{-1}B. I need those diagonal dots to connect nicely, as they do with the zeros. I think the current diagonal dots that I have marked are aimed towards the rule above the target rule, but I'm not sure of this. An MWE of my best attempt is:
\documentclass{article}
\usepackage{amsmath,nicematrix}
\begin{document}
$\begin{bNiceMatrix}[nullify-dots] CA^{-1}B & CA^{-2}B & \Cdots & CA^{-p}B & CA^{-(p+1)}B \\
0 & CA^{-1}B & \Cdots & CA^{-(p-1)}B & CA^{-p}B \\
\Vdots & \Ddots & \Ddots & \Vdots & \Vdots \\
& & & CA^{-1}B & CA^{-2}B \\
0 & \Cdots & & 0 & CA^{-1}B \end{bNiceMatrix}$
\end{document}
How do I make the diagonal dots behave nicely?