You can alter the editor experience by setting an entry for "ino" to use the Microsoft Visual C++ editor in the Text Editor, File Extension settings.
How to select syntax highlighting?
Visual Studio 2022.
Part of ym project involves code for an arduino, which is based in C++, but the files end in ino, which vs studio doesn't automatically recognize as code. Is the only way to change the syntax highlighting by changing the file extension to .cpp? There is ZERO information online that I can find and even the built in search function is useless..... it's "visual" studio, right? Surely I'm missing something.
No, there's no "plain text" option in the bottom right corner of the editor.
No, there's no syntax highlighting or language selection in any of the dropdowns up to.
I could be writing this with emacs for an all-white-on-black text experience.
vim even supports syntax highlighting.
Someone please help because I refuse to believe such a basic feature was overlooked.
Developer technologies Visual Studio Other
1 additional answer
Sort by: Most helpful
-
Tianyu Sun-MSFT 34,436 Reputation points Microsoft External Staff
2023-05-31T08:39:31.1033333+00:00 Hello @Eric B,
Welcome to Microsoft Q&A forum.
Normally, Visual Studio recognizes the file extension and open the file with corresponding code editor automatically. Though the .ino file includes code which is based on C++, Visual Studio may not recognize the .ino file extension, as the .ino file is created for use with Arduino, which causes IntelliSense/syntax highlighting doesn’t work.
You may search in Visual Studio Marketplace and check if there’s any extension which provides the support for Arduino and .ino files in Visual Studio.
Sincerely,
Tianyu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.