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

Allow for XML syntax highlighting in markdown cells #743

Merged
merged 3 commits into from
Dec 4, 2021

Conversation

Adzz
Copy link
Contributor

@Adzz Adzz commented Dec 4, 2021

Allows for xml syntax highlighting in markdown cells using monaco.

closes #720

Allows for xml syntax highlighting in markdown cells
@CLAassistant
Copy link

CLAassistant commented Dec 4, 2021

CLA assistant check
All committers have signed the CLA.

@jonatanklosko
Copy link
Member

Thanks @Adzz! Could you add a screenshot for the reference?

Also, feel free to add JSON, if there are no issues with that.

@Adzz
Copy link
Contributor Author

Adzz commented Dec 4, 2021

No problem I need to take another look as I was looking at the wrong thing. This doesn't seem to have done the trick I'll dig further.

@jonatanklosko
Copy link
Member

Ahh, I think the tokenizer produces keys that are not covered by our custom theme, I will have a closer look!

@jonatanklosko
Copy link
Member

image

image

@jonatanklosko jonatanklosko merged commit a764073 into livebook-dev:main Dec 4, 2021
@Adzz
Copy link
Contributor Author

Adzz commented Dec 4, 2021

Ah nice, thank you, sorry I popped out!

One question, when it didn't work I started creating an XML cell is that something you would be open to?

@jonatanklosko
Copy link
Member

By an XML cell I assume you mean an input that can be read from? We moved all inputs from Livebook to Kino recently (#714). We may have an input with syntax highlighting at some point, there are just some things for us to explore beforehand.

@josevalim
Copy link
Contributor

@Adzz our general thoughts at this point is to not have cells for things that can be embedded into markdown, with the exception of Elixir. That's because if we want to have a proper code cells, then we need to add all of the related editor features.

But there is a high chance we will add a SQL cell in the future and that may shift the conversation.

At the same time, we are expecting people to write SQL inside Livebook... would anyone write XML?

@Adzz
Copy link
Contributor Author

Adzz commented Dec 4, 2021

... then we need to add all of the related editor features.

Makes sense!

we will add a SQL

Agree, I nearly added SQL to the syntax highlighting too for that reason, totally agree that SQL seems a more natural fit for livebook.

I guess my motivation for adding it was to allow for auto-formatting of the XML - with Floki or similar. Similar to how you can run the elixir formatter on elixir cells.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

XML Syntax highlighting
4 participants