Vim has a nice way of dictating what syntax highlighter shall be used with a specific file (disregarding the file extension by specifying the keyword vim:filetype
in the beginning or at the end of the file.)
Is there an equivalent way of suggesting vscode to use a syntax highlighter with a file without paying attention to its file extension?
Example: in vim
# vim:filetype=i3
set $mod Mod4
set $alt Mod1
...
I am not looking for
files.associations
or theChange Language Mode
settings. I want to state the language mapping within the file itself and I understand that probably this is not a builtin feature just hoping an extension can do thisWhy I am interested in this? because many of the so-called dotfiles in Linux don't have any special extension and when you open the file in another vscode instance (in another machine) you want the IDE to be intelligent enough to deduce the correct syntax highlighter.