Skip to content

feat: make picker window winhighlight option configurable#30

Closed
nicholasxjy wants to merge 1 commit into
iofq:masterfrom
nicholasxjy:master
Closed

feat: make picker window winhighlight option configurable#30
nicholasxjy wants to merge 1 commit into
iofq:masterfrom
nicholasxjy:master

Conversation

@nicholasxjy
Copy link
Copy Markdown
Contributor

Add a winhighlight option for picker window, so we can style window a bit. like:

picker = {
  winhighlight = "Normal:DartPickNormal,FloatBorder:DartPickBorder"
}
-- some demo colors
vim.api.nvim_set_hl(0, "DartPickNormal", { fg = "cyan", bg = "#1a1926" })
vim.api.nvim_set_hl(0, "DartPickBorder", { fg = "red", bg = "#1a1926" })
Screenshot 2025-10-19 at 19 33 14 Screenshot 2025-10-19 at 19 33 57

@iofq iofq self-requested a review October 21, 2025 00:39
@iofq
Copy link
Copy Markdown
Owner

iofq commented Oct 21, 2025

Hi, and thanks for the PR!

I can appreciate the use case here, but I'd like to implement this slightly differently to avoid config option bloat. Namely, I'd like to simply return the win object from the Dart.pick() function so you could script the above like this:

local win = Dart.pick()
vim.api.nvim_set_option_value('winhighlight', 'Whatever:YouWant', { win = win })

This opens the door for your use case, but also many other possible use-cases - generally, it makes the picker window far more scriptable.

@nicholasxjy
Copy link
Copy Markdown
Contributor Author

Hi, and thanks for the PR!

I can appreciate the use case here, but I'd like to implement this slightly differently to avoid config option bloat. Namely, I'd like to simply return the win object from the Dart.pick() function so you could script the above like this:

local win = Dart.pick()
vim.api.nvim_set_option_value('winhighlight', 'Whatever:YouWant', { win = win })

This opens the door for your use case, but also many other possible use-cases - generally, it makes the picker window far more scriptable.

look great, yeah we better keep config clean and simple.

@iofq
Copy link
Copy Markdown
Owner

iofq commented Oct 23, 2025

Added, you can see the readme for usage but it's basically what we've outlined here.

https://github.com/iofq/dart.nvim/blob/master/README.md?plain=1#L279

@iofq iofq closed this Oct 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants