Nginx configs aren't detected by CodeMirror
dshoreman opened this issue · comments
Dave Shoreman commented
If you open an nginx site config in the file viewer, it's detected as plain text despite the .conf
extension. CodeMirror supports an nginx mode, but it's annoying to select it every time.
If there's no built-in way to autodetect these files, one option might be to detect any *.conf
file within /etc/nginx/
or it's subdirectories (eg sites-available
). When there's a match we can set the mode dynamically while the file's being loaded.