mao-santaella-rs / NightWolfTheme

🐺 Night Wolf, VsCode Theme by Mao
MIT License
36 stars 8 forks source link

Reserved keywords not properly colored in SQL language #46

Closed marcosvnmelo closed 11 months ago

marcosvnmelo commented 1 year ago

Hi, i really like this theme, but I noticed that the SQL syntax highlighting is not working as expected. Almost all keywords are not colored. For example, see the attached screenshot of a .sql file with Night Wolf theme in comparison to default theme.

Night Wolf theme Default theme
image image

I would appreciate it if you could fix this. Thank you for your great work!

mao-santaella-rs commented 1 year ago

Hi @marcosvnmelo thanks for taking the time to make this issue. I will take care of this as soon as I have time.

mao-santaella-rs commented 1 year ago

Hi @marcosvnmelo if can you create something like a test file for SQL, because I really don't use it, this would help me a lot. thanks

marcosvnmelo commented 1 year ago

Hi @mao-santaella-rs the following code has the most used operations in SQL that I could think of:


-- Commentary example

CREATE TABLE customers (
    id INTEGER PRIMARY KEY,
    first_name TEXT NOT NULL,
    last_name TEXT NOT NULL,
    email TEXT NOT NULL UNIQUE
);

INSERT INTO customers (first_name, last_name, email)
VALUES ('John', 'Doe', 'john.doe@example.com'),
       ('Jane', 'Doe', 'jane.doe@example.com');

SELECT * FROM customers;

UPDATE customers
SET email = 'john.doe@newdomain.com'
WHERE first_name = 'John' AND last_name = 'Doe';

DELETE FROM customers
WHERE first_name = 'Jane' AND last_name = 'Doe';

ALTER TABLE customers
ADD COLUMN phone TEXT;

CREATE INDEX idx_email ON customers (email);

CREATE VIEW customer_info AS
SELECT first_name || ' ' || last_name AS name, email, phone
FROM customers;

SELECT * FROM customer_info;

DROP VIEW customer_info;
mao-santaella-rs commented 1 year ago

Hi @marcosvnmelo sorry for the delay, I managed to create something for SQL files, however, the syntax highlight support in vscode is very limited, I found an extension that helps with this called SQL (BigQuery), once you have this extension the syntax would look like the images below, but before publishing the new version I would like you to take a look at the colors and tell me if the relationship between the same color words makes sense or if I need to be changed it, what I mean is if the all purple colored words belong like to the same kind of elements or some word make more sense to be red or something like this. thanks for taking the time to respond Screenshot 2023-08-31 at 11 51 39 PM Screenshot 2023-08-31 at 11 51 53 PM Screenshot 2023-08-31 at 11 52 20 PM

marcosvnmelo commented 1 year ago

Hi, @mao-santaella-rs, looks great! Thanks for taking some time to a simple request

mao-santaella-rs commented 11 months ago

Perfect! it is coming on the next version