The underscore package allows for the underscore character, in text mode, to behave like \textunderscore. The package does not effect the behaviour in maths mode.
In version TeXstudio 2.12.6 (hg 6632:7777b2b8a906), the syntax highlighting still displays underscores in text mode as errors, even after a successful compilation and the 'underscore' package is included.
I have attached a proof of concept to illustrate the lack of support and
Anonymous
Ticket moved from /p/texstudio/bugs/2371/
This is not supported and most likely won't. We cannot adapt syntax highlighting for modified semantics of every possible package.
As a workaround, you may deactivate syntax checking.
Options -> Editor -> Inline Checking -> Syntax