Code editor now detects filetype upon opening a document.