Highlight Groups
Complete reference for all 115+ highlight groups in coc.nvim for diagnostics, floating windows, popup menu, and semantic tokens.
Vim Highlight Groups
coc.nvim defines over 115 highlight groups with clean default links to standard Vim highlight groups, allowing complete visual customization of diagnostics, float windows, autocomplete popup menus, inlay hints, and symbol trees.
Overview & Customization
The recommended place to override coc.nvim highlight groups is inside a ColorScheme autocommand in your .vimrc / init.vim:
| 1 | " Customize highlights on ColorScheme change |
| 2 | autocmd ColorScheme * highlight CocErrorHighlight ctermfg=Red guifg=#ff5555 gui=undercurl |
| 3 | autocmd ColorScheme * highlight CocFloating ctermbg=Black guibg=#1e222a |
Note: User-defined highlight commands should appear after the :colorscheme command or in a ColorScheme autocmd so that custom highlights survive colorscheme switches.
Markdown related
CocBold
for bold text.
CocItalic
for italic text.
CocUnderline
for underlined text.
CocStrikeThrough
for strikethrough text, such as for deprecated APIs.
CocMarkdownCode
for inline code in markdown content.
CocMarkdownHeader
for markdown header in floating window/popup.
CocMarkdownLink
for markdown link text in floating window/popup.
Diagnostics related
CocFadeOut
for faded out text, such as for highlighting unnecessary code.
CocErrorSign
for error signs.
CocWarningSign
for warning signs.
CocInfoSign
for information signs.
CocHintSign
for hint signs.
CocErrorVirtualText
for error virtual text.
CocWarningVirtualText
for warning virtual text.
CocInfoVirtualText
for information virtual text.
CocHintVirtualText
for hint virtual text.
CocErrorHighlight
for error code range.
CocWarningHighlight
for warning code range.
CocInfoHighlight
for information code range.
CocHintHighlight
for hint code range.
CocDeprecatedHighlight
for deprecated code range, links to
CocUnusedHighlight
for unnecessary code range, links to CocFadeOut by
CocErrorLine
line highlight of sign which contains error.
CocWarningLine
line highlight of sign which contains warning.
CocInfoLine
line highlight of the sign which contains information.
CocHintLine
line highlight of the sign which contains hint.
Document highlight related
CocHighlightText
default symbol highlight.
CocHighlightRead
for Read kind of document symbol.
CocHighlightWrite
for Write kind of document symbol.
Float window/popup related
CocFloating
Default highlight group of floating windows/popups.
CocFloatBorder
Default border highlight group of floating windows/popups.
CocFloatThumb
thumb highlight of scrollbar.
CocFloatSbar
Scrollbar highlight of floating windows/popups.
CocFloatDividingLine
for dividing lines, links to NonText by default.
CocFloatActive
for activated text, links to CocSearch by default.
CocErrorFloat
for error text in floating windows/popups.
CocHintFloat
for hint text in floating windows/popups.
Inlay hint related
CocInlayHint
for inlay hint virtual text blocks; by default uses the
CocInlayHintParameter
for parameter kind of inlay hint.
CocInlayHintType
for type kind of inlay hint.
Notification window/popup related
CocNotificationProgress
for progress line in progress notification.
CocNotificationButton
for action buttons in notification window.
CocNotificationKey
for function keys which trigger actions in notification
CocNotificationError
for highlight border of error notification.
CocNotificationWarning
for highlight border of warning notification.
CocNotificationInfo
for highlight border of info notification.
List related
CocSearch
for matched characters.
CocListLine
for current cursor line in list window and preview window.
CocListSearch
for matched characters.
CocListMode
for mode text in the statusline.
CocListPath
for cwd text in the statusline.
CocSelectedText
for sign text of selected lines (multiple selection only).
CocSelectedLine
for line highlight of selected lines (multiple selection only).
Tree view related
CocTreeTitle
for title in tree view.
CocTreeDescription
for description beside label.
CocTreeOpenClose
for open and close icon in tree view.
CocTreeSelected
for highlighting lines that contain the selected node.
Popup menu related
CocPumSearch
for matched input characters, linked to CocSearch by default.
CocPumDetail
for highlight label details that follows label (including
CocPumMenu
for the menu of a completion item.
CocPumShortcut
for the shortcut text of a source.
CocPumDeprecated
for deprecated label.
CocPumVirtualText
for virtual text inserted from the word of the selected
Inline completion related
CocInlineVirtualText
for virtual text of coc-inlineCompletion, defaulting
CocInlineAnnotation
for annotation virtual text of coc-inlineCompletion,
Symbol icons
CocSymbolDefault
linked to hl-MoreMsg by default.
CocSymbolText
Highlight group for CocSymbolText.
CocSymbolUnit
Highlight group for CocSymbolUnit.
CocSymbolValue
Highlight group for CocSymbolValue.
CocSymbolKeyword
Highlight group for CocSymbolKeyword.
CocSymbolSnippet
Highlight group for CocSymbolSnippet.
CocSymbolColor
Highlight group for CocSymbolColor.
CocSymbolReference
Highlight group for CocSymbolReference.
CocSymbolFolder
Highlight group for CocSymbolFolder.
CocSymbolFile
Highlight group for CocSymbolFile.
CocSymbolModule
Highlight group for CocSymbolModule.
CocSymbolNamespace
Highlight group for CocSymbolNamespace.
CocSymbolPackage
Highlight group for CocSymbolPackage.
CocSymbolClass
Highlight group for CocSymbolClass.
CocSymbolMethod
Highlight group for CocSymbolMethod.
CocSymbolProperty
Highlight group for CocSymbolProperty.
CocSymbolField
Highlight group for CocSymbolField.
CocSymbolConstructor
Highlight group for CocSymbolConstructor.
CocSymbolEnum
Highlight group for CocSymbolEnum.
CocSymbolInterface
Highlight group for CocSymbolInterface.
CocSymbolFunction
Highlight group for CocSymbolFunction.
CocSymbolVariable
Highlight group for CocSymbolVariable.
CocSymbolConstant
Highlight group for CocSymbolConstant.
CocSymbolString
Highlight group for CocSymbolString.
CocSymbolNumber
Highlight group for CocSymbolNumber.
CocSymbolBoolean
Highlight group for CocSymbolBoolean.
CocSymbolArray
Highlight group for CocSymbolArray.
CocSymbolObject
Highlight group for CocSymbolObject.
CocSymbolKey
Highlight group for CocSymbolKey.
CocSymbolNull
Highlight group for CocSymbolNull.
CocSymbolEnumMember
Highlight group for CocSymbolEnumMember.
CocSymbolStruct
Highlight group for CocSymbolStruct.
CocSymbolEvent
Highlight group for CocSymbolEvent.
CocSymbolOperator
Highlight group for CocSymbolOperator.
CocSymbolTypeParameter
Highlight group for CocSymbolTypeParameter.
Others
CocDisabled
highlight for disabled items, e.g. menu items.
CocCodeLens
for virtual text of codeLens.
CocCursorRange
for highlight of activated cursors ranges.
CocLinkedEditing
for highlight of activated linked editing ranges.
CocHoverRange
for range of current hovered symbol.
CocMenuSel
for current menu item in menu dialog (should only provide
CocSelectedRange
for highlight ranges of outgoing calls.
CocSnippetVisual
for highlight snippet placeholders.
CocLink
for highlight document links.
CocInputBoxVirtualText
for highlight placeholder of input box.
<!-- generated-current-vim-reference -->
Theme preview and colorscheme overrides
These swatches are illustrative only. The active Vim or Neovim colorscheme and user :highlight commands determine final colors. Inspect a live value with :highlight CocErrorHighlight; apply overrides after :colorscheme or from a ColorScheme autocommand so they survive theme changes.
Complete highlight index
CocBold— CocBold highlight group: for bold text.
CocCodeLens— CocCodeLens highlight group: for virtual text of codeLens.
CocCursorRange— CocCursorRange highlight group: for highlight of activated cursors ranges.
CocDeprecatedHighlight— CocDeprecatedHighlight highlight group: for deprecated code range, links to CocStrikeThrough by default.
CocDisabled— CocDisabled highlight group: highlight for disabled items, e.g. menu items.
CocErrorFloat— CocErrorFloat highlight group: for error text in floating windows/popups.
CocErrorHighlight— CocErrorHighlight highlight group: for error code range.
CocErrorLine— CocErrorLine highlight group: line highlight of sign which contains error.
CocErrorSign— CocErrorSign highlight group: for error signs.
CocErrorVirtualText— CocErrorVirtualText highlight group: for error virtual text.
CocFadeOut— CocFadeOut highlight group: for faded out text, such as for highlighting unnecessary code.
CocFloatActive— CocFloatActive highlight group: for activated text, links to CocSearch by default.
CocFloatBorder— Default border highlight group of floating windows/popups. Links to FloatBorder when it exists and CocFloating otherwise. Note: only foreground color is used for border highlight.
CocFloatDividingLine— CocFloatDividingLine highlight group: for dividing lines, links to NonText by default.
CocFloating— Default highlight group of floating windows/popups. Links to NormalFloat on Neovim and Pmenu on Vim by default.
CocFloatSbar— Scrollbar highlight of floating windows/popups.
CocFloatThumb— CocFloatThumb highlight group: thumb highlight of scrollbar.
CocHighlightRead— CocHighlightRead highlight group: for Read kind of document symbol.
CocHighlightText— CocHighlightText highlight group: default symbol highlight.
CocHighlightWrite— CocHighlightWrite highlight group: for Write kind of document symbol.
CocHintFloat— CocHintFloat highlight group: for hint text in floating windows/popups.
CocHintHighlight— CocHintHighlight highlight group: for hint code range.
CocHintLine— CocHintLine highlight group: line highlight of the sign which contains hint.
CocHintSign— CocHintSign highlight group: for hint signs.
CocHintVirtualText— CocHintVirtualText highlight group: for hint virtual text.
CocHoverRange— CocHoverRange highlight group: for range of current hovered symbol.
CocInfoHighlight— CocInfoHighlight highlight group: for information code range.
CocInfoLine— CocInfoLine highlight group: line highlight of the sign which contains information.
CocInfoSign— CocInfoSign highlight group: for information signs.
CocInfoVirtualText— CocInfoVirtualText highlight group: for information virtual text.
CocInlayHint— CocInlayHint highlight group: for inlay hint virtual text blocks; by default uses the foreground from CocHintSign and the background from SignColumn.
CocInlayHintParameter— CocInlayHintParameter highlight group: for parameter kind of inlay hint.
CocInlayHintType— CocInlayHintType highlight group: for type kind of inlay hint.
CocInline— Inline completion related
CocInlineAnnotation— CocInlineAnnotation highlight group: for annotation virtual text of coc-inlineCompletion, defaulting to "MoreMsg".
CocInlineVirtualText— CocInlineVirtualText highlight group: for virtual text of coc-inlineCompletion, defaulting to a medium gray.
CocInputBoxVirtualText— CocInputBoxVirtualText highlight group: for highlight placeholder of input box.
CocItalic— CocItalic highlight group: for italic text.
CocLink— CocLink highlight group: for highlight document links.
CocLinkedEditing— CocLinkedEditing highlight group: for highlight of activated linked editing ranges.
CocList— CocList highlight group.
CocListLine— CocListLine highlight group: for current cursor line in list window and preview window.
CocListMode— CocListMode highlight group: for mode text in the statusline.
CocListPath— CocListPath highlight group: for cwd text in the statusline.
CocListSearch— CocListSearch highlight group: for matched characters.
CocMarkdownCode— CocMarkdownCode highlight group: for inline code in markdown content.
CocMarkdownHeader— CocMarkdownHeader highlight group: for markdown header in floating window/popup.
CocMarkdownLink— CocMarkdownLink highlight group: for markdown link text in floating window/popup.
CocMenuSel— CocMenuSel highlight group: for current menu item in menu dialog (should only provide background color).
CocNotification— CocNotification highlight group.
CocNotificationButton— CocNotificationButton highlight group: for action buttons in notification window.
CocNotificationError— CocNotificationError highlight group: for highlight border of error notification.
CocNotificationInfo— CocNotificationInfo highlight group: for highlight border of info notification.
CocNotificationKey— CocNotificationKey highlight group: for function keys which trigger actions in notification popups (vim9 only).
CocNotificationProgress— CocNotificationProgress highlight group: for progress line in progress notification.
CocNotificationWarning— CocNotificationWarning highlight group: for highlight border of warning notification.
CocPum— CocPum highlight group.
CocPumDeprecated— CocPumDeprecated highlight group: for deprecated label.
CocPumDetail— CocPumDetail highlight group: for highlight label details that follows label (including possible detail and description).
CocPumMenu— CocPumMenu highlight group: for the menu of a completion item.
CocPumSearch— CocPumSearch highlight group: for matched input characters, linked to CocSearch by default.
CocPumShortcut— CocPumShortcut highlight group: for the shortcut text of a source.
CocPumVirtualText— CocPumVirtualText highlight group: for virtual text inserted from the word of the selected completion item; enabled by coc-config-suggest-virtualText.
CocSearch— CocSearch highlight group: for matched characters.
CocSelectedLine— CocSelectedLine highlight group: for line highlight of selected lines (multiple selection only).
CocSelectedRange— CocSelectedRange highlight group: for highlight ranges of outgoing calls.
CocSelectedText— CocSelectedText highlight group: for sign text of selected lines (multiple selection only).
CocSem— Semantic highlight groups start with CocSem and link to related nvim-treesitter highlight groups when possible, falling back to builtin highlight groups. Use g:coc_default_semantic_highlight_groups to disable creation of these highlight groups.
CocSnippetVisual— CocSnippetVisual highlight group: for highlight snippet placeholders.
CocStrikeThrough— CocStrikeThrough highlight group: for strikethrough text, such as for deprecated APIs.
CocSymbol— Highlight groups for symbol icons, covering the CompletionItemKind and SymbolKind of LSP. The highlight groups link to related nvim-treesitter highlight groups when possible and fall back to builtin highlight groups.
CocSymbolArray— CocSymbolArray highlight group.
CocSymbolBoolean— CocSymbolBoolean highlight group.
CocSymbolClass— CocSymbolClass highlight group.
CocSymbolColor— CocSymbolColor highlight group.
CocSymbolConstant— CocSymbolConstant highlight group.
CocSymbolConstructor— CocSymbolConstructor highlight group.
CocSymbolDefault— CocSymbolDefault highlight group: linked to hl-MoreMsg by default.
CocSymbolEnum— CocSymbolEnum highlight group.
CocSymbolEnumMember— CocSymbolEnumMember highlight group.
CocSymbolEvent— CocSymbolEvent highlight group.
CocSymbolField— CocSymbolField highlight group.
CocSymbolFile— CocSymbolFile highlight group.
CocSymbolFolder— CocSymbolFolder highlight group.
CocSymbolFunction— CocSymbolFunction highlight group.
CocSymbolInterface— CocSymbolInterface highlight group.
CocSymbolKey— CocSymbolKey highlight group.
CocSymbolKeyword— CocSymbolKeyword highlight group.
CocSymbolMethod— CocSymbolMethod highlight group.
CocSymbolModule— CocSymbolModule highlight group.
CocSymbolNamespace— CocSymbolNamespace highlight group.
CocSymbolNull— CocSymbolNull highlight group.
CocSymbolNumber— CocSymbolNumber highlight group.
CocSymbolObject— CocSymbolObject highlight group.
CocSymbolOperator— CocSymbolOperator highlight group.
CocSymbolPackage— CocSymbolPackage highlight group.
CocSymbolProperty— CocSymbolProperty highlight group.
CocSymbolReference— CocSymbolReference highlight group.
CocSymbolSnippet— CocSymbolSnippet highlight group.
CocSymbolString— CocSymbolString highlight group.
CocSymbolStruct— CocSymbolStruct highlight group.
CocSymbolText— CocSymbolText highlight group.
CocSymbolTypeParameter— Note: use configuration coc-config-suggest-completionItemKindLabels for custom icon characters.
CocSymbolUnit— CocSymbolUnit highlight group.
CocSymbolValue— CocSymbolValue highlight group.
CocSymbolVariable— CocSymbolVariable highlight group.
CocTree— CocTree highlight group.
CocTreeDescription— CocTreeDescription highlight group: for description beside label.
CocTreeOpenClose— CocTreeOpenClose highlight group: for open and close icon in tree view.
CocTreeSelected— CocTreeSelected highlight group: for highlighting lines that contain the selected node.
CocTreeTitle— CocTreeTitle highlight group: for title in tree view.
CocUnderline— CocUnderline highlight group: for underlined text.
CocUnusedHighlight— CocUnusedHighlight highlight group: for unnecessary code range, links to CocFadeOut by default.
CocWarningHighlight— CocWarningHighlight highlight group: for warning code range.
CocWarningLine— CocWarningLine highlight group: line highlight of sign which contains warning.
CocWarningSign— CocWarningSign highlight group: for warning signs.
CocWarningVirtualText— CocWarningVirtualText highlight group: for warning virtual text.