This answer is for nano version 5.9 on Termux version 0.117. Disclaimer: I don't understand exactly how .nanorc code works here (so, it possibly should be a bit different, but it seems to work).
To turn syntax highlighting off for all file types, do this in ~/.nanorc
:
syntax "all" "\.*$"
color white,black "^.*$"
In the latter set of double quotes for each line, those are regular expressions. On the first line, the regex matches any file extension (I don't think "all" actually does anything; I just had to type a word in there; it doesn't work if it's blank or has multiple words). On the second line, the regex matches the entire text of the document, and sets the foreground (the font color) to white, and the highlight background to black.
I guess this does the same thing in a simpler way (I suppose it evaluates each character at a time):
syntax "all" "."
color white,black "."
If you just want to do the same thing for one kind of file, here is an example for .txt
files:
syntax "txt" "\.txt$"
color white,black "^.*$"
Or
syntax "txt" "\.txt$"
color white,black "."
If you don't want to specify the background highlight color (which is not the entire background color of nano, btw), too, then instead of doing color white,black . . .
do color white . . .
.
Note: My personal reason for wanting to disable syntax highlighting was because comments beginning with #
were a different color in plain text files and similar (and I didn't want that). These solutions make the comments white.