Implement kind highlights (#584)

* Implement kind highlights

* Fix link
This commit is contained in:
hrsh7th
2021-11-27 19:20:44 +09:00
committed by GitHub
parent 7b744e0589
commit 593a6345de
3 changed files with 31 additions and 1 deletions

View File

@@ -212,7 +212,7 @@ entry.get_view = function(self, suggest_offset)
view.kind.text = item.kind or ''
view.kind.bytes = #view.kind.text
view.kind.width = vim.str_utfindex(view.kind.text)
view.kind.hl_group = 'CmpItemKind'
view.kind.hl_group = 'CmpItemKind' .. types.lsp.CompletionItemKind[self:get_kind()]
view.menu = {}
view.menu.text = item.menu or ''
view.menu.bytes = #view.menu.text