feat: add highlight group: TelescopePreviewMessage (#1286)

* feat: add highlight group: TelescopePreviewMessage

* fix indentation from 4 to 2 spaces
This commit is contained in:
Sávio Carlos Martins Costa
2021-09-27 06:59:05 -03:00
committed by GitHub
parent 4816a27d76
commit 87471bc3ff
2 changed files with 6 additions and 1 deletions

View File

@@ -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