feat: add highlight group: TelescopePreviewMessage (#1286)
* feat: add highlight group: TelescopePreviewMessage * fix indentation from 4 to 2 spaces
This commit is contained in:
committed by
GitHub
parent
4816a27d76
commit
87471bc3ff
@@ -66,6 +66,9 @@ local function set_timeout_message(bufnr, winid, message)
|
||||
false,
|
||||
utils.repeated_table(height, table.concat(utils.repeated_table(width, "╱"), ""))
|
||||
)
|
||||
for linenr = 0, height do
|
||||
vim.api.nvim_buf_add_highlight(bufnr, -1, "TelescopePreviewMessage", linenr, 0, -1)
|
||||
end
|
||||
local anon_ns = vim.api.nvim_create_namespace ""
|
||||
local padding = table.concat(utils.repeated_table(#message + 4, " "), "")
|
||||
local lines = {
|
||||
@@ -81,7 +84,7 @@ local function set_timeout_message(bufnr, winid, message)
|
||||
anon_ns,
|
||||
math.floor(height / 2) - 1 + i,
|
||||
0,
|
||||
{ virt_text = { { line, "Normal" } }, virt_text_pos = "overlay", virt_text_win_col = col }
|
||||
{ virt_text = { { line, "TelescopePreviewMessage" } }, virt_text_pos = "overlay", virt_text_win_col = col }
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user