Skip to content

Commit 283a6af

Browse files
authored
fix(highlight): fix invalid highlight for doc separator (#449)
Also add default highlight in default config and README
1 parent aa70277 commit 283a6af

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -687,6 +687,7 @@ MiniDeps.add({
687687
| `BlinkCmpGhostText` | Comment | Preview item with ghost text |
688688
| `BlinkCmpDoc` | NormalFloat | The documentation window |
689689
| `BlinkCmpDocBorder` | NormalFloat | The documentation window border |
690+
| `BlinkCmpDocSeparator` | NormalFloat | The documentation separator between doc and detail |
690691
| `BlinkCmpDocCursorLine` | Visual | The documentation window cursor line |
691692
| `BlinkCmpSignatureHelp` | NormalFloat | The signature help window |
692693
| `BlinkCmpSignatureHelpBorder` | NormalFloat | The signature help window border |

lua/blink/cmp/highlights.lua

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ function highlights.setup()
3333

3434
set_hl('BlinkCmpDoc', { link = 'NormalFloat' })
3535
set_hl('BlinkCmpDocBorder', { link = 'NormalFloat' })
36+
set_hl('BlinkCmpDocSeparator', { link = 'NormalFloat' })
3637
set_hl('BlinkCmpDocCursorLine', { link = 'Visual' })
3738

3839
set_hl('BlinkCmpSignatureHelp', { link = 'NormalFloat' })

lua/blink/cmp/lib/window/docs.lua

+1-3
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,8 @@ function docs.render_detail_and_documentation(bufnr, detail, documentation, max_
3939
-- Only add the separator if there are documentation lines (otherwise only display the detail)
4040
if #detail_lines > 0 and #doc_lines > 0 then
4141
vim.api.nvim_buf_set_extmark(bufnr, highlight_ns, #detail_lines, 0, {
42-
virt_text = { { string.rep('', max_width) } },
42+
virt_text = { { string.rep('', max_width), 'BlinkCmpDocSeparator' } },
4343
virt_text_pos = 'overlay',
44-
hl_eol = true,
45-
hl_group = 'BlinkCmpDocDetail',
4644
})
4745
end
4846

0 commit comments

Comments
 (0)