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

42-SQL/PRQL-syntax-highlighting-issued-solved #71

Conversation

Nitinyadav237
Copy link
Contributor

@Nitinyadav237 Nitinyadav237 commented Apr 15, 2024

@ramonverse
#42 SQL/PRQL-syntax-highlighting-issued-solved

42.sql-prql.mp4

@Nitinyadav237
Copy link
Contributor Author

@ramonverse If you'd like to adjust the color scheme, please specify the desired changes.

{ token: "keyword.sql", foreground: "#48db40", fontStyle: "italic bold" },
{ token: "white.sql", foreground: "#c0d218", fontStyle: "italic bold" },
{ token: "operator.sql", foreground: "#48db40", fontStyle: "italic bold" },
{ token: "comment.sql", foreground: "#4673e6", fontStyle: "italic bold" },
{ token: "identifier.sql", foreground: "#db4055", fontStyle: "italic bold" },

{ token: "keyword.prql", foreground: "#e3c91e", fontStyle: "italic bold" },
{ token: "white.prql", foreground: "#21f140", fontStyle: "italic bold" },
{ token: "operator.prql", foreground: "#d8550f", fontStyle: "italic bold" },
{ token: "identifier.prql", foreground: "#095c94", fontStyle: "bold italic" },
{ token: "comment.prql", foreground: "#6e0dc9", fontStyle: "bold italic" },

@Nitinyadav237
Copy link
Contributor Author

I have solved the #42 SQL / PRQL syntax highlighting
Description:

1.Created editor.tsx, which contains a custom theme for the editor and PRQL language configuration.
2.In userquery.tsx, added loader.init() to load the custom theme and set PRQL language configuration.
3.Added separate states sqlUserInput and prqlUserInput to preserve user-typed values in the editor.

42.mp4

@ramonverse
Copy link
Collaborator

@Nitinyadav237 can we remove the italic? also the font looks way bigger than the rest of the app and there is unnecessary margin between the box and the line numbers. Can you fix that? thank you!

Copy link
Collaborator

@ramonverse ramonverse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we remove the italic? also the font looks way bigger than the rest of the app and there is unnecessary margin between the box and the line numbers. Can you fix that? thank you!

@Nitinyadav237
Copy link
Contributor Author

@ramonverse :
1. Italics removed.
2.Font size reduced to 14px.
3.Eliminated unnecessary margin between the box and the line numbers.

image

How do you feel about the color?

image

@ramonverse ramonverse merged commit b16ff31 into pretzelai:main May 13, 2024
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.

None yet

2 participants