filetype detection and preliminary syntax highlighting