clutcher / bh

Issue tracker for Better Highlights Intellij IDEA plugin
7 stars 0 forks source link

Add keyword highlighting for SQL #91

Closed MinionWare closed 8 months ago

MinionWare commented 9 months ago

I'd like comment tokens, regxp, and wikilink to work in .sql files. I think I can currently get comment tokens to work, but the others would also be nice.

clutcher commented 9 months ago

@MinionWare As I see right now only keyword highlighting is not supported. I'll add that in nearest release. As for wikilinks - do you want to somehow reference sql queries in comments? Or reference regular languages like Java, JS etc?

MinionWare commented 9 months ago

Yeah, it would be great to ref other code blocks in comments. It would also be nice to ref other code files in the proj. So say I'm commenting how the current SP is related to another. I'd like to be able to ref that other SP so I can just click on it and go there. But if not, at least be able to ref a section of code in the same file.

And yeah, the regex highlighting would be really nice too.

-Sean

[1506638742078_minionware]


From: Igor Zarvanskyi @.> Sent: Sunday, December 24, 2023 05:11 To: clutcher/bh @.> Cc: Sean McCown @.>; Mention @.> Subject: Re: [clutcher/bh] SQL Compat (Issue #91)

@MinionWarehttps://github.com/MinionWare As I see right now only keyword highlighting is not supported. I'll add that in nearest release. As for wikilinks - do you want to somehow reference sql queries in comments? Or reference regular languages like Java, JS etc?

— Reply to this email directly, view it on GitHubhttps://github.com/clutcher/bh/issues/91#issuecomment-1868502257, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADY75M55IZWGN32Y7LXNC6LYLALYRAVCNFSM6AAAAABA2O36LSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRYGUYDEMRVG4. You are receiving this because you were mentioned.Message ID: @.***>

clutcher commented 9 months ago

@MinionWare In next release 2023.8.11 I added support for keyword highlighting for SQL. Regexp highlighting is already working. As for referrencing stored procedures in sql files I'll create a separate ticket.

MinionWare commented 9 months ago

You said regex is already working... did you mean in the current release, cause I'm not able to get it to do anything.

-Sean

[1506638742078_minionware]


From: Igor Zarvanskyi @.> Sent: Friday, December 29, 2023 03:15 To: clutcher/bh @.> Cc: Sean McCown @.>; Mention @.> Subject: Re: [clutcher/bh] SQL Compat (Issue #91)

@MinionWarehttps://github.com/MinionWare In next release 2023.8.11 I added support for keyword highlighting for SQL. Regexp highlighting is already working. As for referrencing stored procedures in sql files I'll create a separate ticket.

— Reply to this email directly, view it on GitHubhttps://github.com/clutcher/bh/issues/91#issuecomment-1871919329, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADY75M5IU3YNJ7HYQNTKVFDYL2J5VAVCNFSM6AAAAABA2O36LSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZRHEYTSMZSHE. You are receiving this because you were mentioned.Message ID: @.***>

clutcher commented 9 months ago

@MinionWare Yes, even in current available release regexp highlighting is working with sql. You can share your case/regexp and I can check it.

MinionWare commented 9 months ago

While I've tried several patterns, here's a simple one. RegesSetting RegexInCode

clutcher commented 9 months ago

@MinionWare In your regexp ^ means start of the line. Most probably you want just Minion

2024-01-02_14-51-43

MinionWare commented 9 months ago

Then this one. Either one of these should trigger it. I've tried them both separately but I've included them both so you can see. RegesSetting2 RegexInCode2

clutcher commented 9 months ago

@MinionWare Hmmm... Maybe issue is in selected Theme? Is "Dark" setup as Intellij theme/editor color? Maybe, something similar to this comment - https://github.com/clutcher/bh/issues/79#issuecomment-1781559334 ?

What IDE are you using? Is it Idea Ultimate with built-in DB/SQL support?

MinionWare commented 9 months ago

Ok, I did some messing around with different themes and they all behaved the same. However, when I cleared the background image it started working. Is there a way you can get it working with background images?

-Sean

[1506638742078_minionware]


From: Igor Zarvanskyi @.> Sent: Tuesday, January 2, 2024 22:45 To: clutcher/bh @.> Cc: Sean McCown @.>; Mention @.> Subject: Re: [clutcher/bh] Add keyword highlighting for SQL (Issue #91)

@MinionWarehttps://github.com/MinionWare Hmmm... Maybe issue is in selected Theme? Is "Dark" setup as Intellij theme/editor color? Maybe, something similar to this comment - #79 (comment)https://github.com/clutcher/bh/issues/79#issuecomment-1781559334 ?

— Reply to this email directly, view it on GitHubhttps://github.com/clutcher/bh/issues/91#issuecomment-1874876813, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADY75MZOCWJWW7E7KB4IQU3YMTWA3AVCNFSM6AAAAABA2O36LSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZUHA3TMOBRGM. You are receiving this because you were mentioned.Message ID: @.***>

clutcher commented 9 months ago

@MinionWare Don't see any issues with enabled background image

2024-01-09_19-02-00

Maybe issue in the image itself? Can you share it?

MinionWare commented 8 months ago

I re-applied the image and it seems to have cleared up. Maybe it just needed the styles applied before the image is there? However, wikilinks still don't work... I've pasted the file so you can try it with my code. Just rename it to .sql. BackupsFormatHTMLRow.txt

clutcher commented 8 months ago

@MinionWare

MinionWare commented 8 months ago

I pulled down the latest release and the highlighting and wikilinks are working great so far. Thanks. Now, if it's not getting too greedy, do you think there's a way to do multi-line comments? Something like a closing tag... Example: DevNote: Don't delete this code. //

It would also be nice to be able to edit code comments instead of having to delete them when I want to change the name.

clutcher commented 8 months ago

@MinionWare

MinionWare commented 8 months ago

No, I'm talking about renaming comment tokens. If I create a token and get it all setup and then notice that i misspelled it, I can't change the name. I have to delete it and start over.

Sean McCown (817)937-6154 [cid:99f65a01-f9a2-42f2-a4f2-92bcae7fbf1b]


From: Igor Zarvanskyi @.> Sent: Wednesday, January 17, 2024 09:29 To: clutcher/bh @.> Cc: Sean McCown @.>; Mention @.> Subject: Re: [clutcher/bh] Add keyword highlighting for SQL (Issue #91)

@MinionWarehttps://github.com/MinionWare

— Reply to this email directly, view it on GitHubhttps://github.com/clutcher/bh/issues/91#issuecomment-1896167751, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADY75MZDIQOFNY6FELMTOHLYO737VAVCNFSM6AAAAABA2O36LSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJWGE3DONZVGE. You are receiving this because you were mentioned.Message ID: @.***>

clutcher commented 8 months ago

@MinionWare There is separate issue for that - https://github.com/clutcher/bh/issues/81 . Unfortunately I don't have plans to add renaming functionality in near future. I already put enough hacks to make + and - work together with color and theme selection. Even existing solution for + and - doesn't work great as it not preserve changes betwen token/scheme switch. Implementation of edit is much harder.