DTStack / DTStack/monaco-sql-languages

Colors...

Đang mở
#178 1 bình luận 0 reaction 1 người được giao Được @liuxy0551 nhận Xem trên GitHub
Ngôn ngữ chính
TypeScript
Star
295
Fork
50
Merge trung bình
1 giờ 21 phút
Pull request đã merge (30 ngày)
1

Mô tả

Not really an issue, more a few improvements for colorization ;-)

Currently, I'm using the onigasm with vsdarkplus theme for pgplsql.
This is an example how my code looks like:

![Image](https://github.com/user-attachments/assets/837dc427-f069-445c-b1c8-73e4d6881d68)

When I paste this in your playground; I get the following:

![Image](https://github.com/user-attachments/assets/cc96862b-c7f2-456c-886a-bf0a5686b0ab)

A few things caught my mind:

1. The "replace" part of "create or replace" is recognized as function rather than statement.
2. The word "begin" at the start of the function body should be colored as control flow
3. The column- and table names have no special meaning, so the default colorizer keeps them uncoloured. In your version, I do not see a difference. I would imagine that I can feed a data model to the language server in order to perform auto complete and may be to colorize them in a special color when the table name is recognized (as Dbeaver now does, see below)
4. I changed one rule in the original colorizer: I colorize words that start with an underscore with an alternate color. That's just a personal taste because I always declare variables with underscores to prevent ambiguity. You can see the effect in the "select ... into..." part.

dbeaver example:

![Image](https://github.com/user-attachments/assets/be1937ca-b36a-4507-bdc5-19d35da82852)

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.