How can I add more supported file extension (eg .cnf) for Remote - SSH: Editing Configuration Files

549 Views Asked by At

I'm using VSCode Remote - SSH: Editing Configuration Files for syntax highlighting for some configuration files, it works fine for .conf etc. However, i want to it able to work with MySQL .cnf, i have no way so far, just with a workaround of creating a soft link as "ln -s /etc/my.cnf /etc/my.conf" and going to edit the /etc/my.conf instead. It works but not convenient, i don't want to create that soft link. Is there any place i can add .cnf into the support list of Remote - SSH: Editing Configuration Files?

Thanks & Regards, Martin.

1

There are 1 best solutions below

1
On BEST ANSWER

You should be able to use a language identifier instead:

"files.associations": {
    "*.cnf": "ini"
} 

https://code.visualstudio.com/assets/docs/languages/overview/language-id-intellisense.png

Or use the "Sleect Langage Mode" by clicking on the "Plain Text" part of the status bar in the lower right corner of the VSCode IDE.

That local configuration, once set, should persists in a remote VSCode SSH session.