You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I got this right the actual highlight logic is in cpp.ts. In cpp.contribution.ts you can see that editor registers c language but imports cpp logic.
Maybe you could use the cpp.ts file as a starter and build own logic for C and then we could try to register it on our monaco editor? 🤔
Well, except for the keywords, C and C++ pretty much are the same language as far as simple highlighting is concerned - I can't think about any other construct I'd want to highlight differently... So I've removed some keywords from cpp.ts (more than in the list above - Microsoft also highlights keywords for its extensions) and put the result into a highlight/c.ts file in feat/c-highlighting branch. How does one register it in the Monaco editor?
This is most visible highlighting keywords, where the editor incorrectly highlights C++-specific
bool
,catch
,class
,constexpr
,const_cast
,decltype
,delete
,dynamic_cast
,explicit
,export
,false
,friend
,mutable
,namespace
,new
,noexcept
,nullptr
,operator
,private
,protected
,public
,reinterpret_cast
,static_assert
,static_cast
,template
,this
,thread_local
,throw
,true
,try
,typeid
,typename
,using
andvirtual
.Also, the
asm
keyword isn't highlighted but should be.The text was updated successfully, but these errors were encountered: