viewvim -R -c 'set ft=sql' -
viewis an alias forvim -R, which opens Vim in read-only mode. Your system may have the aliasviewforvim -R, but Neovim does not support it.set ftis short forset filetype. As Martin Tournoij mentioned in his comment, setting the file type sets the syntax and more.