cake-rider
cake-rider copied to clipboard
Syntax highlighting
Installing this plugin disables all syntax highlighting in a .cake file. Is that by design?
@Leon99 well, the answer is yes, that is currently by design.
Rider, in it's default, somehow assumes some language for Cake files. (I've not found out which, currently.) When installing Cake for Rider, we define a language for Cake files (this is needed for most of the things the plugin does) and this definition in it's current state does not include syntax highlighting, sadly.
Sad indeed, editing C# code without syntax highlighting is not nice at all.
Agreed. Sadly "extending" on existing languages is not possible in Rider. So we can't re-use what's available for c# and have to re-implement everything. Currently the only IDE supporting auto-complete and highlighting is the Cake extension for VS Code. (There, that's done via OmniSharp which sadly is not an option for Rider)
So we can't re-use what's available for c# and have to re-implement everything
That completely defeats the point of a rider plugin imo. If you want to use omnisharp, just use vscode.
Sadly "extending" on existing languages is not possible in Rider
Are you sure? Don't know hacky it will be yet, but I'm pretty sure all we have to do is to just "fake" our own C# project to resharper.
Are you sure? Don't know hacky it will be yet, but I'm pretty sure all we have to do is to just "fake" our own C# project to resharper.
This is, in essence, what O# does when processing Cake. I've never tried it that way.. You're very welcome to give it a try.
@nils-a Do you know of any resources I could use to learn how to do Syntax Highlighting? I use the plugin almost everyday and really appreciate it. but the lack of syntax highlighting does frustrate me. I'd love to contribute to help start implementing it but unfortunately my skills in Plugin Development and Kotlin are limited so I would need to learn.
@garywoodfine The best resource I know is the Custom Language part of the SDK. You'd best start with Implementing a lexer and then continue over the following two chapters.
However, there is also (a bit undocumented, though) the Embedded Language feature. I've always wanted to test if that could be utilized to "overlay" the cake features over any existing language.
On a sidenote: Learning Kotlin was very straight forward for me. In part it's very similar to C# and Java and it is simply a brilliant language. (You can use the IntelliJ in the community edition to work on the plugin.)
Thanks I will take a look and set myself onto a new learning adventure!!