Repository navigation
Conversation
|
@mvanhorn thanks for this PR, I think we can simplify this by using Are you currently using this library? |
|
Updated in 5fc9f84: syntax colors are now read with To answer your question: no, I'm not using the library myself. I picked up #26 to contribute. If compile-time configuration isn't the direction you want, I'm happy to close this. |
Schultzer
left a comment
There was a problem hiding this comment.
Thanks, we're almost there. I imagine this feature to be around 13 lines of additions.
Also @mvanhorn can you tell me how you work now a days, obvisouly there is an agent behind this, but I'm not sure if there is a human in this loop.
|
@mvanhorn please do me a favor and just amend the first commit in this PR with all the changes, no need for multiple commits for this feature. |
e1e54f3 to
e260f74
Compare
|
@Schultzer Updated and squashed into the first commit, so the PR is now a single commit.
The code change is 5 lines now; with the README and CHANGELOG it's 22 additions. mix compile --warnings-as-errors and mix test are clean (397 tests). On how I work: I use AI coding agents to draft the changes and the replies, and I review and approve every commit and comment before it goes out, including this one. If you'd rather work with me differently on this PR, happy to adjust. |
Thanks, just a rebase and we should be good to merge this. |
Read the keyword, literal, enclosed, and error colors from config :sql, :syntax_colors with Application.compile_env, falling back to the current IO.ANSI defaults. The reset sequence stays fixed. Fixes elixir-dbvisor#26 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019wSaUMZrtm6XSzwEcxavkv
e260f74 to
3c23785
Compare
|
Rebased on main (3c23785). The only conflict was CHANGELOG.md, so the entry now sits under a new Unreleased section above v0.6.0. mix test passes locally. |
SQL.Format.syntax_color/1 reads :syntax_colors from the :sql application environment and turns a color name, or a list of them, into an ANSI fragment with IO.ANSI.format_fragment. Formatted SQL and the compile-time warnings that quote it always highlight keywords, literals, enclosed quotes, and errors with the same ANSI colors.
Tests for this live in
test/syntax_colors_test.exs.Closes #26