In the case of an extremely disconnected function such as ${\left(-2\right)}^{x}$. One definition requires that a derivative must be continous.
$(-2)^x$ has two paths that could make it discontinuous since
$$(-2)^x=\begin{cases} 2^x & n=\frac{\text{even integer}}{\text{odd integer}}\\ -\left(2^x\right) & n=\frac{\text{odd integer}}{\text{odd integer}}\\ \text{undefined} & n=\frac{\text{odd integer}}{\text{even integer}}\end{cases} $$
However, the derivative by the limit definition is possible at $\frac{\text{even integer}}{\text{odd integer}}$ as it approaches zero in... $$f'(x)=\lim_{x\to0}\frac{f(x+h)-f(x)}{h}$$
According to my answer in We can define the derivative of a function whose domain is a subset of rational numbers?
So does the derivative of ${\left(-2\right)}^{x}$ exist and if so is $\left(-2\right)^{x}$ continuous?
You can define the derivative of $f$ on any cluster point of its domain. This is not a new concept. For example, I phrased it like that because that is how Bartle describes it in The Elements of Real Analysis, though only briefly before restricting his attention to the usual sets.
Wherever a function $f$ is differentiable in its domain $D$, it is always continuous with respect to that domain: If $f'(x_0) = L$, then $$\lim_{D \ni x\to x_0}\frac{f(x) -f(x_0)}{x - x_0} = L.$$ Thus, letting $\epsilon = 1$, there is a $\delta > 0$ such that if $0 < |x - x_0| < \delta$ and $x \in D$, then $$\left | \frac{f(x) - f(x_0)}{x - x_0} - L \right | < 1$$ $$ -|x - x_0| < f(x) - f(x_0) - L(x - x_0) <|x - x_0|$$ $$|f(x) - f(x_0)| < (|L| + 1)|x - x_0|$$ From which it follows that $f(x) \to f(x_0)$ as $x \to x_0$ in $D$.
In this case, consider 3 possible domains for $f(x) = (-2)^x$ as you have defined it: $$D_0 = \left\{ {2n\over 2m+1}\ |\ n, m \in \Bbb Z\right\}$$ $$D_1 = \left\{ {2n+1\over 2m+1}\ |\ n, m \in \Bbb Z\right\}$$ $$D_2 = \left\{ {n\over 2m+1}\ |\ n, m \in \Bbb Z\right\} = D_0 \cup D_1$$
The differentiability of $f$ on $D_0$ follows from that of $2^x$ on $\Bbb R$, and the differentiability of $f$ on $D_1$ similarly follows from that of $-2^x$. But $f$ is obviously not continuous on $D_2$.
One final note: an additional loosening of the definition of derivative at $x_0$ would be the double limit:$$\lim_{x_1,x_2 \to x_0}\frac{f(x_1) - f(x_2)}{x_1 - x_2}$$ Under this definition $f$ no longer needs to be defined at $x_0$, so continuity fails. But by the same argument above, it must still satisfy a Cauchy condition there, so the discontinuity is removable.