Skip to content
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

New language: XAML (Extensible Application Markup Language ) #5990

Open
Schecher1 opened this issue Jul 22, 2022 · 17 comments
Open

New language: XAML (Extensible Application Markup Language ) #5990

Schecher1 opened this issue Jul 22, 2022 · 17 comments
Labels
Add Language Good First Issue This is a great opportunity to start contributing to Linguist

Comments

@Schecher1
Copy link

Language name

XAML (Extensible Application Markup Language)

Description

It is a FrontEnd language for (most popular) WPFs and MAUIs, is used by the VB and C# language.

URL of example repository

Press me to go to the Repo

URL of syntax highlighting grammar

Press me to get the Wikipedia Post

Most popular extensions

*.xaml

Detected language

Unfortunately it is recognized as XML and is not even displayed, apart from that there is a huge difference between XML and XAML. Only that XAML has the structure of XML.

Color of recognition

It should be a BrightBlue as well as the logo of XAML. Here are some HEX examples. As well as my source (XAML-Logo)

004AAE
145FCE
0548B3
336CBB

@Schecher1 Schecher1 added Add Language Good First Issue This is a great opportunity to start contributing to Linguist labels Jul 22, 2022
@Alhadis
Copy link
Collaborator

Alhadis commented Jul 23, 2022

apart from that there is a huge difference between XML and XAML. Only that XAML has the structure of XML.

What huge difference? It looks exactly like ordinary XML to me.

@Schecher1
Copy link
Author

Schecher1 commented Jul 23, 2022

What huge difference? It looks exactly like ordinary XML to me.

So of course xaml is based on xml, but with xaml you don't store data but define an interface. Xaml is partly like HTML and CSS. As an example.

@Alhadis
Copy link
Collaborator

Alhadis commented Jul 23, 2022

Syntactically, what's the difference? Is there a difference?

@Schecher1
Copy link
Author

Well, the syntax can't be much different because it's based on XML. But actually the reason would be enough that with XML you store data and with XAML you can define UI.

Data != Interface.

The UI is just described by an XML syntax.

Like:

<Button x:Name="Bttn_SelectFile" Content="Select File" HorizontalAlignment="Left" Margin="30,45,0,0" VerticalAlignment="Top" Height="45" Width="85" RenderTransformOrigin="0.294,0" FontSize="15" Click="Bttn_SelectFile_Click"/>

@Schecher1
Copy link
Author

But let's assume that XAML is XML. Why is the language not listed in the history of a repo?

I mean, I have now in a project 20 C# files and 13 XML (XAML) files. Why is only 100% C# shown? This is simply not true.

@Schecher1
Copy link
Author

image

image

@Nixinova
Copy link
Contributor

Why is only 100% C# shown?

XML is classified as data by default and is therefore hidden in the sidebar by default. Which therein lies the justification for this request.

@Schecher1
Copy link
Author

It is understandable that XML is classified as data, because it is. But now I hope you can understand why I don't agree that XAML is represented as XML.

@Schecher1
Copy link
Author

Is there anything new? greetings

@Alhadis
Copy link
Collaborator

Alhadis commented Aug 7, 2022

@Schecher1 If you want XAML files to contribute to your project's language statistics, you can use an override:

*.xaml linguist-detectable

@Schecher1
Copy link
Author

Hello, thank you for the answer. But I mean if you/we can standardize it? So that the language as well as C# is automatically detected. Apart from that, when I add this in the ".gitattributes" file only XML appears, and there we come back to my problem.

@Alhadis
Copy link
Collaborator

Alhadis commented Aug 7, 2022

@Schecher1 If you know of a TextMate grammar for XAML that will improve the appearance of .xaml files, then we can add XAML as a separate language. We'd happily accept a pull-request in that case.

@Schecher1
Copy link
Author

Thanks, is there somewhere an instruction how I make the request? so what I have to add?

@Alhadis
Copy link
Collaborator

Alhadis commented Aug 7, 2022

Literally everything you need to know is documented in CONTRIBUTING.md.

@Schecher1
Copy link
Author

Thank you, I will create the request and then delete this issue when everything is finished.

@Schecher1
Copy link
Author

Add a syntax-highlighting grammar for your language using:

I do not quite understand, may u can help me?

@lildude
Copy link
Member

lildude commented Sep 1, 2022

Add a syntax-highlighting grammar for your language using:

I do not quite understand, may u can help me?

Run the command shown (script/add-grammar) from within your checkout of your fork of this repo replacing the URL with the URL of the grammar you are adding.

This will require you to have met all the requirements as detailed at the start of the document.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Add Language Good First Issue This is a great opportunity to start contributing to Linguist
Projects
None yet
Development

No branches or pull requests

4 participants