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,
|
false,
|
||||||
utils.repeated_table(height, table.concat(utils.repeated_table(width, "╱"), ""))
|
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 anon_ns = vim.api.nvim_create_namespace ""
|
||||||
local padding = table.concat(utils.repeated_table(#message + 4, " "), "")
|
local padding = table.concat(utils.repeated_table(#message + 4, " "), "")
|
||||||
local lines = {
|
local lines = {
|
||||||
@@ -81,7 +84,7 @@ local function set_timeout_message(bufnr, winid, message)
|
|||||||
anon_ns,
|
anon_ns,
|
||||||
math.floor(height / 2) - 1 + i,
|
math.floor(height / 2) - 1 + i,
|
||||||
0,
|
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
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -54,6 +54,8 @@ highlight default link TelescopePreviewUser Constant
|
|||||||
highlight default link TelescopePreviewGroup Constant
|
highlight default link TelescopePreviewGroup Constant
|
||||||
highlight default link TelescopePreviewDate Directory
|
highlight default link TelescopePreviewDate Directory
|
||||||
|
|
||||||
|
highlight default link TelescopePreviewMessage TelescopePreviewNormal
|
||||||
|
|
||||||
" Used for Picker specific Results highlighting
|
" Used for Picker specific Results highlighting
|
||||||
highlight default link TelescopeResultsClass Function
|
highlight default link TelescopeResultsClass Function
|
||||||
highlight default link TelescopeResultsConstant Constant
|
highlight default link TelescopeResultsConstant Constant
|
||||||
|
|||||||
Reference in New Issue
Block a user