feat: add highlight on matching chars in results buffer
This commit is contained in:
parent
9b3d186701
commit
39e6878b58
2 changed files with 10 additions and 4 deletions
|
|
@ -19,15 +19,19 @@ end
|
|||
|
||||
controller.input = function(char)
|
||||
prompt.input(char)
|
||||
vim.schedule(function()
|
||||
window.set_items(controller.items(prompt.text()))
|
||||
end)
|
||||
controller.update(prompt.text())
|
||||
end
|
||||
|
||||
controller.search = function(value)
|
||||
prompt.set(value)
|
||||
controller.update(prompt.text())
|
||||
end
|
||||
|
||||
controller.update = function(text)
|
||||
vim.schedule(function()
|
||||
window.set_items(controller.items(prompt.text()))
|
||||
window.set_items(controller.items(text))
|
||||
vim.cmd("syntax clear IvyMatch")
|
||||
vim.cmd("syntax match IvyMatch '[(" .. text .. ")]'")
|
||||
end)
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -67,3 +67,5 @@ end, { bang = true, desc = "List all of the current open buffers" })
|
|||
vim.api.nvim_set_keymap("n", "<leader>b", "<cmd>IvyBuffers<CR>", { nowait = true, silent = true })
|
||||
vim.api.nvim_set_keymap("n", "<leader>p", "<cmd>IvyFd<CR>", { nowait = true, silent = true })
|
||||
vim.api.nvim_set_keymap("n", "<leader>/", "<cmd>IvyAg<CR>", { nowait = true, silent = true })
|
||||
|
||||
vim.cmd "highlight IvyMatch cterm=bold"
|
||||
|
|
|
|||
Loading…
Reference in a new issue