-
Notifications
You must be signed in to change notification settings - Fork 677
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[QUESTION] Cake support in Omnisharp #1684
Comments
Cross posting from #1681:
|
@DustinCampbell I am more than happy to remove the syntax highlighting from the VSCode Extension for Cake. Cake is built on C#, so obviously most things will be highlighted correctly. In the above screenshot you will see things like |
I hadn't noticed that the syntax highlighting above had colored Task and Does specially. Have you looked at the C# syntax highlighting in a more robust color theme (like the default Dark+ theme)? That has much richer colors, and you can see that function calls are highlight differently, which draws attention to top-level Task and Does functions quite nicely: |
I'd say we ditch our Cake specific highlighting and use C# default instead. But @gep13 could have last call. This would also have to be synced with Cake Extension for VS Code. |
@DustinCampbell oh, interesting! No I hadn't seen the highlighting in that theme. In which case, I would tend to agree that we could remove the syntax highlighting from the Cake Extension for VSCode, and instead, point people at using the existing Themes. @patriksvensson @devlead @mholo65 @agc93 thoughts? |
I'm all for deleting custom code, so if standard C# works, yes lets ditch the specific one. |
OK. I contributed this as a PR and it is now merged into VS Code: microsoft/vscode#32253. So, Cake files will be treated as C#. We should see this show up in VS Code Insiders builds soon. |
Great! Thanks @DustinCampbell @gep13 could probably start looking at removing Cake highlighting from Cake-VSCode |
@DustinCampbell sweet! @mholo65 yip, it is on my list for over the weekend, so hopefully get to this, and get a new version of the extension out for testing. |
I forgot to update everyone here, but the latest VS Code release (1.16.1) now colorizes cake files by default (even when C# for VS Code is not installed). |
Oh nice 👍 |
@DustinCampbell that is very cool! Thanks for letting us know! 😄 |
@mholo65: I've released v1.13.0-beta4, which contains the new Cake bits. However, when testing it on Windows, I got the following:
|
@DustinCampbell nice! The warning you are getting is due to See examle in test-project https://github.com/OmniSharp/omnisharp-roslyn/blob/master/test-assets/test-projects/CakeProject/tools/packages.config |
@DustinCampbell assuming you have the latest Cake extension for VSCode, there is a new command that will help with installing that dependency. |
Ah. I need the Cake extension. thanks! |
@DustinCampbell You don't need the Cake extension, but it makes it a lot easier to install |
I just installed the Cake extension and invoked the "Cake: install intellisense support" command. All is now well. Looks great! I think we can close this issue now. Nice work everyone! |
@DustinCampbell that is great news! |
We the Cake Team, through the amazing work of @mholo65 have been working on adding Cake support in OmniSharp in order to provide Intellisense support within *.cake files. The necessary work to get this working are contained within these PR's:
OmniSharp/omnisharp-roslyn#932
#1681
All this seems to work, with the exception of one thing...
As part of the Cake extension for Visual Studio we provide syntax highlighting for .cake files through registering a new language, as can be seen here:
However, when trying to use Omnisharp through the changes in the above PR's, the only way that we have been able to get this to work is by changing the Language Mode to C#, which obviously loses the syntax highlighting that we provide.
We have been pointed at this location:
https://github.com/Microsoft/vscode/blob/master/extensions/csharp/package.json
What is required in order to get Omnisharp to "light" for .cake files, whilst still providing syntax highlighting?
The text was updated successfully, but these errors were encountered: