-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
add Linqpad script extension .linq to C# #4896
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Here is what .linq files will look like once highlighted as C#: https://github-lightshow.herokuapp.com/?utf8=%E2%9C%93&scope=source.cs&grammar_format=cson&grammar_url=https%3A%2F%2Fgithub.com%2FAlhadis%2FAtom-PostScript%2Fblob%2Fmaster%2Fgrammars%2Fpostscript.cson&grammar_text=&code_source=from-url&code_url=https%3A%2F%2Fgithub.com%2Fgithub%2Flinguist%2Fblob%2Faef6346fb60b1a5a464345f443cd6f2f443350bb%2Fsamples%2FC%2523%2Fchart-process-memory.linq&code=.
It might be worth defining a new grammar that include the C# grammar and highlights the top annotations as XML, but I don't think it's blocking.
@pchaigno Yes, it would be nice to change the grammar too to highlight the top linq query metadata. but I am not familiar with how to change the grammar. maybe it is my next todo. ;D |
@yongzhao1 please update the template to link to the original source of the sample, and not your fork of Linguist. We need a record of where the file came from, not how it got into Linguist 😄 |
You should be able to edit the template by clicking the three dots in the top right corner of the comment in which you placed the template and select "Edit".
I know where it'll end up 😄 . I need to know where the file came from. Where did you get that file from? That's the link we need in the template. |
Nevermind. I've found where the file comes from... it comes from a repo you own at https://github.com/zyonet/PowerLinqPadScripts/blob/master/LinqPad5/chart-process-memory.linq. I've updated the template to link to this file. |
@lildude: thanks! |
References: * Cubit: vscode-icons/vscode-icons#2551 * Draw.IO: vscode-icons/vscode-icons#2518 * LINQPad: github-linguist/linguist#4896 * xmake: vscode-icons/vscode-icons#2550
Description
LInqPad scripts are written in C# language with some linqpad related metadata added. Linqpad scripts have extension .linq and linqpad scripts in GitHub are not properly syntax highlighted. adding .linq extension to the C# language in languages.yml will fix this.
Checklist: