The indicator function on a set $A$ is a function $1_A:A\to \{0,1\}$ defined by $$1_A(x)= \begin{cases} 1 &\text{if } x\in A \text{ and}\\ 0 &\text{if } x\notin A. \end{cases}$$
More specifically, if $L$ is a linear subspace of $\mathbb{F}_2^n$, the above notation holds. If $L$ corresponds to a general finite field, is there a finite field notation of the indicator function using for example the trace function or similar?