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

Highlight SQL inside JDBC calls #12

Closed
Deraen opened this issue Feb 4, 2021 · 1 comment
Closed

Highlight SQL inside JDBC calls #12

Deraen opened this issue Feb 4, 2021 · 1 comment
Labels
enhancement New feature or request highlighting Affects syntax highlighting

Comments

@Deraen
Copy link
Member

Deraen commented Feb 4, 2021

https://github.com/krisajenkins/vim-clojure-sql

But we might be able to detect next.jdbc and clojure.java.jdbc calls and highlight parameters for those using SQL syntax.

@axvr axvr added the enhancement New feature or request label Oct 17, 2021
@axvr
Copy link
Member

axvr commented Apr 9, 2022

It's a good idea, but I think a separate plugin like the one you linked to is the best place for something like this. I just can't see a way of implementing it nicely (believe me, I did try).

The main problem is that we don't want to highlight SQL keywords in any random string, so we need to check if the outer function is a JDBC (or next.jdbc) call, but this wouldn't be reliable because:

  • The JDBC function could be wrapped by a custom function, so we completely fail to detect it.
  • The function may have been referred in. (So we need to match on the non-fully-qualified-symbols too.)
  • A user defined function may happen to have the same name as the non-fully-qualified symbols we check for.

Just to name a few...

I'm going to close this for now, but I'm happy to reopen it if anyone finds a reliable way of integrating this.

@axvr axvr closed this as completed Apr 9, 2022
@axvr axvr closed this as not planned Won't fix, can't repro, duplicate, stale Jun 23, 2023
@axvr axvr added the highlighting Affects syntax highlighting label Jun 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request highlighting Affects syntax highlighting
Projects
None yet
Development

No branches or pull requests

2 participants