feature: connection colors #91

Closed
opened 2026-07-15 17:36:06 -05:00 by noe.trevino · 0 comments
Owner

Did you check the docs?

  • I have read all the dadbod-ui.nvim docs

Sometimes i accidentally run a query in prod, and i meant to run in the test environment.

Right now there is nothing that screams at you telling you you are on a sensitive database

Describe the solution you'd like

Let a connection or a group carry a color, and paint it everywhere the connection is named.

The winbar is the good surface here - show_buffer_connection already renders group/name at the top of every query buffer, so the color costs us nothing and sits where you're already looking when you type.

This is a hint, not a guarantee. It pairs with read-only connections and dangerous statement detection, it doesn't replace either.

Acceptance Criteria

  • able to recolor connections
  • connections persist across restarts
  • store information in connections.json
  • store color in a hex code format
  • groups can be colored, and a connection's own color wins over its group's
  • color renders in the drawer
  • color renders in the query buffer winbar
  • no color set is the default, and looks exactly like today

Describe alternatives/other solutions you've considered

DBeaver's connection types (DEV/TEST/PROD). The color rides along with a whole bag of other behavior. feature includes autocommit defaults, confirm-on-execute, idle timeouts.
That's more than we want (imo), and the confirming half is its own issue. We just want the color, and we already have groups, so a type is different concept that we can add later on.

Highlight group names instead of hex?
More neovim-native, and it'd inherit from the colorscheme. Going with hex because it's self-contained in connections.json and doesn't break when someone swaps themes. Maybe we do both??

### Did you check the docs? - [X] I have read all the dadbod-ui.nvim docs ### Is your feature request related to a problem? Please describe. Sometimes i accidentally run a query in prod, and i meant to run in the test environment. Right now there is nothing that screams at you telling you you are on a sensitive database ### Describe the solution you'd like Let a connection or a group carry a color, and paint it everywhere the connection is named. The winbar is the good surface here - `show_buffer_connection` already renders `group/name` at the top of every query buffer, so the color costs us nothing and sits where you're already looking when you type. This is a hint, not a guarantee. It pairs with read-only connections and dangerous statement detection, it doesn't replace either. ### Acceptance Criteria - [ ] able to recolor connections - [ ] connections persist across restarts - [ ] store information in `connections.json` - [ ] store color in a hex code format - [ ] groups can be colored, and a connection's own color wins over its group's - [ ] color renders in the drawer - [ ] color renders in the query buffer winbar - [ ] no color set is the default, and looks exactly like today ### Describe alternatives/other solutions you've considered DBeaver's connection types (DEV/TEST/PROD). The color rides along with a whole bag of other behavior. feature includes autocommit defaults, confirm-on-execute, idle timeouts. That's more than we want (imo), and the confirming half is its own issue. We just want the color, and we already have groups, so a type is different concept that we can add later on. Highlight group names instead of hex? More neovim-native, and it'd inherit from the colorscheme. Going with hex because it's self-contained in `connections.json` and doesn't break when someone swaps themes. Maybe we do both??
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
noe.trevino/dadbod-ui.nvim#91
No description provided.