or run

tessl search
Log in

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
npmpkg:npm/coc.nvim@0.0.x

docs

index.md
tile.json

tessl/npm-coc-nvim

tessl install tessl/npm-coc-nvim@0.0.0

LSP based intellisense engine for neovim & vim8.

highlights.mddocs/reference/

Highlight Groups [Intermediate]

Complexity: Intermediate | Category: Reference | Keywords: highlights, colors, appearance, theme, syntax

Common Tasks: Customize colors | Match theme | Style diagnostics | Configure completion menu

Complete reference for all highlight groups used by coc.nvim. These groups control the appearance of diagnostics, completions, floating windows, and semantic highlighting.

Table of Contents

Common Tasks

Match Your Color Scheme

" Link coc highlights to existing groups
highlight link CocErrorSign ErrorMsg
highlight link CocWarningSign WarningMsg
highlight link CocFloating Pmenu

Reuses existing Vim highlight groups for consistency.

Customize Diagnostic Colors

highlight CocErrorSign ctermfg=Red guifg=#e06c75
highlight CocWarningSign ctermfg=Yellow guifg=#e5c07b
highlight CocInfoSign ctermfg=Blue guifg=#61afef
highlight CocHintSign ctermfg=Cyan guifg=#56b6c2

Sets custom colors for diagnostic signs.

Style Completion Menu

highlight CocMenuSel ctermbg=237 guibg=#3e4452
highlight CocPumSearch ctermfg=214 guifg=#e5c07b cterm=bold gui=bold

Customizes completion popup appearance.

Disable Undercurl

highlight CocErrorHighlight ctermbg=52 guibg=#5f0000
highlight CocWarningHighlight ctermbg=58 guibg=#5f5f00

Uses background color instead of undercurl for diagnostics.

Highlight Groups Overview

Coc.nvim uses over 100 highlight groups organized into these categories:

CategoryCountPurpose
Text Style6Bold, italic, underline, strikethrough
Markdown3Documentation formatting
Diagnostics20Errors, warnings, hints (signs, text, highlights)
Document6Symbol highlighting, hover ranges
Float Windows5Floating window backgrounds and text
Notifications4Notification borders and buttons
List Interface6Fuzzy finder appearance
Tree View4Explorer tree styling
Completion7Popup menu items and search
Symbol Icons35+Completion item kinds
Semantic Tokens25+Language semantic highlighting
Other5CodeLens, snippets, inlay hints

Text Style

CocBold

CocBold

Bold text in documentation and UI elements.

Default: Bold text style Example:

highlight CocBold cterm=bold gui=bold
highlight CocBold cterm=bold gui=bold guifg=#ffffff

CocItalic

CocItalic

Italic text in documentation and UI elements.

Default: Italic text style Example:

highlight CocItalic cterm=italic gui=italic
highlight CocItalic cterm=italic gui=italic guifg=#928374

CocUnderline

CocUnderline

Underlined text.

Default: Underline style Example:

highlight CocUnderline cterm=underline gui=underline
highlight CocUnderline cterm=underline gui=underline guisp=#61afef

CocStrikeThrough

CocStrikeThrough

Strikethrough text for deprecated items.

Default: Strikethrough style Example:

highlight CocStrikeThrough cterm=strikethrough gui=strikethrough
highlight CocStrikeThrough cterm=strikethrough gui=strikethrough guifg=#888888

CocFadeOut

CocFadeOut

Faded out text for inactive elements.

Default: Dimmed foreground color Example:

highlight CocFadeOut ctermfg=245 guifg=#928374
highlight CocFadeOut ctermfg=240 guifg=#5c6370

CocDisabled

CocDisabled

Disabled UI items.

Default: Very dim foreground color Example:

highlight CocDisabled ctermfg=240 guifg=#585858
highlight CocDisabled ctermfg=238 guifg=#3e4452

Markdown

CocMarkdownCode

CocMarkdownCode

Inline code in markdown documentation.

Default: Distinct code color Example:

highlight CocMarkdownCode ctermfg=109 guifg=#83a598
highlight CocMarkdownCode ctermfg=114 guifg=#98c379

CocMarkdownHeader

CocMarkdownHeader

Markdown headers in documentation.

Default: Bold header color Example:

highlight CocMarkdownHeader ctermfg=214 guifg=#fabd2f cterm=bold gui=bold
highlight CocMarkdownHeader ctermfg=204 guifg=#e06c75 cterm=bold gui=bold

CocMarkdownLink

CocMarkdownLink

Markdown links.

Default: Underlined link color Example:

highlight CocMarkdownLink ctermfg=109 guifg=#83a598 cterm=underline gui=underline
highlight CocMarkdownLink ctermfg=39 guifg=#61afef cterm=underline gui=underline

Diagnostic Signs

CocErrorSign

CocErrorSign

Error signs in sign column.

Default: Red color Example:

highlight CocErrorSign ctermfg=Red guifg=#ff0000
highlight CocErrorSign ctermfg=204 guifg=#e06c75
highlight CocErrorSign ctermfg=196 guifg=#ff5555

CocWarningSign

CocWarningSign

Warning signs in sign column.

Default: Yellow/orange color Example:

highlight CocWarningSign ctermfg=Yellow guifg=#ffcc00
highlight CocWarningSign ctermfg=214 guifg=#e5c07b
highlight CocWarningSign ctermfg=220 guifg=#ffcc66

CocInfoSign

CocInfoSign

Information signs in sign column.

Default: Blue color Example:

highlight CocInfoSign ctermfg=Blue guifg=#0088ff
highlight CocInfoSign ctermfg=39 guifg=#61afef
highlight CocInfoSign ctermfg=75 guifg=#56b6c2

CocHintSign

CocHintSign

Hint signs in sign column.

Default: Cyan/green color Example:

highlight CocHintSign ctermfg=Cyan guifg=#00ffaa
highlight CocHintSign ctermfg=114 guifg=#98c379
highlight CocHintSign ctermfg=87 guifg=#56b6c2

Diagnostic Virtual Text

CocErrorVirtualText

CocErrorVirtualText

Error virtual text at end of line.

Default: Red dimmed color Example:

highlight CocErrorVirtualText ctermfg=Red guifg=#ff0000
highlight CocErrorVirtualText ctermfg=203 guifg=#be5046

CocWarningVirtualText

CocWarningVirtualText

Warning virtual text.

Default: Yellow dimmed color Example:

highlight CocWarningVirtualText ctermfg=Yellow guifg=#ffcc00
highlight CocWarningVirtualText ctermfg=173 guifg=#d19a66

CocInfoVirtualText

CocInfoVirtualText

Info virtual text.

Default: Blue dimmed color Example:

highlight CocInfoVirtualText ctermfg=Blue guifg=#0088ff
highlight CocInfoVirtualText ctermfg=38 guifg=#528bff

CocHintVirtualText

CocHintVirtualText

Hint virtual text.

Default: Cyan dimmed color Example:

highlight CocHintVirtualText ctermfg=Cyan guifg=#00ffaa
highlight CocHintVirtualText ctermfg=86 guifg=#4db5bd

Diagnostic Highlights

CocErrorHighlight

CocErrorHighlight

Error code range highlighting.

Default: Red undercurl or background Example:

" Undercurl style
highlight CocErrorHighlight cterm=undercurl gui=undercurl guisp=#ff0000
" Background style
highlight CocErrorHighlight ctermbg=52 guibg=#5f0000
" Subtle undercurl
highlight CocErrorHighlight cterm=undercurl gui=undercurl guisp=#e06c75

CocWarningHighlight

CocWarningHighlight

Warning code range highlighting.

Default: Yellow undercurl or background Example:

" Undercurl style
highlight CocWarningHighlight cterm=undercurl gui=undercurl guisp=#ffcc00
" Background style
highlight CocWarningHighlight ctermbg=58 guibg=#5f5f00
" Subtle undercurl
highlight CocWarningHighlight cterm=undercurl gui=undercurl guisp=#e5c07b

CocInfoHighlight

CocInfoHighlight

Info code range highlighting.

Default: Blue undercurl or background Example:

" Undercurl style
highlight CocInfoHighlight cterm=undercurl gui=undercurl guisp=#0088ff
" Background style
highlight CocInfoHighlight ctermbg=17 guibg=#00005f
" Subtle undercurl
highlight CocInfoHighlight cterm=undercurl gui=undercurl guisp=#61afef

CocHintHighlight

CocHintHighlight

Hint code range highlighting.

Default: Cyan undercurl or background Example:

" Undercurl style
highlight CocHintHighlight cterm=undercurl gui=undercurl guisp=#00ffaa
" Background style
highlight CocHintHighlight ctermbg=23 guibg=#005f5f
" Subtle undercurl
highlight CocHintHighlight cterm=undercurl gui=undercurl guisp=#56b6c2

CocDeprecatedHighlight

CocDeprecatedHighlight

Deprecated code highlighting.

Default: Strikethrough Example:

highlight CocDeprecatedHighlight cterm=strikethrough gui=strikethrough
highlight CocDeprecatedHighlight cterm=strikethrough gui=strikethrough guisp=#888888
highlight CocDeprecatedHighlight ctermfg=240 guifg=#585858 cterm=strikethrough gui=strikethrough

CocUnusedHighlight

CocUnusedHighlight

Unused code highlighting.

Default: Dimmed color Example:

highlight CocUnusedHighlight ctermfg=240 guifg=#585858
highlight CocUnusedHighlight ctermfg=243 guifg=#5c6370

Diagnostic Lines

CocErrorLine

CocErrorLine

Full line highlight for errors.

Default: Error background color Example:

highlight CocErrorLine ctermbg=52 guibg=#3f0000
highlight CocErrorLine ctermbg=52 guibg=#2d0f0f

CocWarningLine

CocWarningLine

Full line highlight for warnings.

Default: Warning background color Example:

highlight CocWarningLine ctermbg=58 guibg=#3f3f00
highlight CocWarningLine ctermbg=58 guibg=#2d2a0f

CocInfoLine

CocInfoLine

Full line highlight for info.

Default: Info background color Example:

highlight CocInfoLine ctermbg=17 guibg=#00003f
highlight CocInfoLine ctermbg=17 guibg=#0f1a2d

CocHintLine

CocHintLine

Full line highlight for hints.

Default: Hint background color Example:

highlight CocHintLine ctermbg=23 guibg=#003f3f
highlight CocHintLine ctermbg=23 guibg=#0f2d2a

Document Highlights

CocHighlightText

CocHighlightText

Default symbol highlight (read/write).

Default: Subtle background highlight Example:

highlight CocHighlightText ctermbg=237 guibg=#3a3a3a
highlight CocHighlightText ctermbg=238 guibg=#3e4452

CocHighlightRead

CocHighlightRead

Symbol read occurrence highlight.

Default: Green-tinted background Example:

highlight CocHighlightRead ctermbg=22 guibg=#2a4a2a
highlight CocHighlightRead ctermbg=22 guibg=#2d3a2d

CocHighlightWrite

CocHighlightWrite

Symbol write occurrence highlight.

Default: Red-tinted background Example:

highlight CocHighlightWrite ctermbg=52 guibg=#4a2a2a
highlight CocHighlightWrite ctermbg=52 guibg=#3a2d2d

CocHoverRange

CocHoverRange

Hovered symbol range.

Default: Subtle background highlight Example:

highlight CocHoverRange ctermbg=237 guibg=#3a3a3a
highlight CocHoverRange ctermbg=238 guibg=#3e4452

CocCursorRange

CocCursorRange

Cursor range for multi-cursor.

Default: Distinct background highlight Example:

highlight CocCursorRange ctermbg=237 guibg=#3a3a3a
highlight CocCursorRange ctermbg=239 guibg=#4b5263

CocLinkedEditing

CocLinkedEditing

Linked editing ranges (e.g., HTML tags).

Default: Background highlight Example:

highlight CocLinkedEditing ctermbg=237 guibg=#3a3a3a
highlight CocLinkedEditing ctermbg=238 guibg=#3e4452

CocSelectedRange

CocSelectedRange

Selected ranges.

Default: Background highlight Example:

highlight CocSelectedRange ctermbg=237 guibg=#3a3a3a
highlight CocSelectedRange ctermbg=238 guibg=#3e4452

Float Windows

CocFloating

CocFloating

Default floating window background.

Default: Popup menu background Example:

highlight CocFloating ctermbg=235 guibg=#1e1e1e
highlight CocFloating ctermbg=236 guibg=#282c34
highlight link CocFloating Pmenu

CocErrorFloat

CocErrorFloat

Error text in floating windows.

Default: Error foreground color Example:

highlight CocErrorFloat ctermfg=Red guifg=#ff0000
highlight CocErrorFloat ctermfg=204 guifg=#e06c75

CocWarningFloat

CocWarningFloat

Warning text in floating windows.

Default: Warning foreground color Example:

highlight CocWarningFloat ctermfg=Yellow guifg=#ffcc00
highlight CocWarningFloat ctermfg=214 guifg=#e5c07b

CocInfoFloat

CocInfoFloat

Info text in floating windows.

Default: Info foreground color Example:

highlight CocInfoFloat ctermfg=Blue guifg=#0088ff
highlight CocInfoFloat ctermfg=39 guifg=#61afef

CocHintFloat

CocHintFloat

Hint text in floating windows.

Default: Hint foreground color Example:

highlight CocHintFloat ctermfg=Cyan guifg=#00ffaa
highlight CocHintFloat ctermfg=114 guifg=#98c379

Notifications

CocNotificationProgress

CocNotificationProgress

Progress notification line.

Default: Accent color Example:

highlight CocNotificationProgress ctermfg=109 guifg=#83a598
highlight CocNotificationProgress ctermfg=39 guifg=#61afef

CocNotificationButton

CocNotificationButton

Action buttons in notifications.

Default: Button background Example:

highlight CocNotificationButton ctermbg=237 guibg=#3a3a3a
highlight CocNotificationButton ctermbg=238 guibg=#3e4452

CocNotificationError

CocNotificationError

Error notification border.

Default: Error color Example:

highlight CocNotificationError ctermfg=Red guifg=#ff0000
highlight CocNotificationError ctermfg=204 guifg=#e06c75

CocNotificationWarning

CocNotificationWarning

Warning notification border.

Default: Warning color Example:

highlight CocNotificationWarning ctermfg=Yellow guifg=#ffcc00
highlight CocNotificationWarning ctermfg=214 guifg=#e5c07b

CocNotificationInfo

CocNotificationInfo

Info notification border.

Default: Info color Example:

highlight CocNotificationInfo ctermfg=Blue guifg=#0088ff
highlight CocNotificationInfo ctermfg=39 guifg=#61afef

List Interface

CocListLine

CocListLine

Current selected line in list.

Default: Selection background Example:

highlight CocListLine ctermbg=237 guibg=#3a3a3a
highlight CocListLine ctermbg=238 guibg=#3e4452

CocListSearch

CocListSearch

Matched search characters in list.

Default: Highlighted search text Example:

highlight CocListSearch ctermfg=214 guifg=#fabd2f cterm=bold gui=bold
highlight CocListSearch ctermfg=214 guifg=#e5c07b cterm=bold gui=bold

CocListMode

CocListMode

Mode indicator text in list.

Default: Mode color Example:

highlight CocListMode ctermfg=109 guifg=#83a598
highlight CocListMode ctermfg=39 guifg=#61afef

CocListPath

CocListPath

File path text in list.

Default: Subdued color Example:

highlight CocListPath ctermfg=245 guifg=#928374
highlight CocListPath ctermfg=243 guifg=#5c6370

CocSelectedText

CocSelectedText

Sign for selected text.

Default: Accent color Example:

highlight CocSelectedText ctermfg=214 guifg=#fabd2f
highlight CocSelectedText ctermfg=204 guifg=#e06c75

CocSelectedLine

CocSelectedLine

Selected line background.

Default: Selection background Example:

highlight CocSelectedLine ctermbg=237 guibg=#3a3a3a
highlight CocSelectedLine ctermbg=238 guibg=#3e4452

CocSearch

CocSearch

General search result highlight.

Default: Search highlight Example:

highlight CocSearch ctermfg=214 guifg=#fabd2f ctermbg=237 guibg=#3a3a3a
highlight CocSearch ctermfg=214 guifg=#e5c07b ctermbg=238 guibg=#3e4452

Tree View

CocTreeTitle

CocTreeTitle

Tree view title.

Default: Bold title color Example:

highlight CocTreeTitle ctermfg=214 guifg=#fabd2f cterm=bold gui=bold
highlight CocTreeTitle ctermfg=204 guifg=#e06c75 cterm=bold gui=bold

CocTreeDescription

CocTreeDescription

Tree item descriptions.

Default: Subdued color Example:

highlight CocTreeDescription ctermfg=245 guifg=#928374
highlight CocTreeDescription ctermfg=243 guifg=#5c6370

CocTreeOpenClose

CocTreeOpenClose

Tree expand/collapse icons.

Default: Accent color Example:

highlight CocTreeOpenClose ctermfg=109 guifg=#83a598
highlight CocTreeOpenClose ctermfg=39 guifg=#61afef

CocTreeSelected

CocTreeSelected

Selected tree item.

Default: Selection background Example:

highlight CocTreeSelected ctermbg=237 guibg=#3a3a3a
highlight CocTreeSelected ctermbg=238 guibg=#3e4452

Popup Menu (Completion)

CocPumSearch

CocPumSearch

Matched input characters in completion menu.

Default: Highlighted match color Example:

highlight CocPumSearch ctermfg=214 guifg=#fabd2f cterm=bold gui=bold
highlight CocPumSearch ctermfg=214 guifg=#e5c07b cterm=bold gui=bold

CocPumMenu

CocPumMenu

Completion menu background.

Default: Popup menu background Example:

highlight CocPumMenu ctermbg=235 guibg=#262626
highlight CocPumMenu ctermbg=236 guibg=#282c34
highlight link CocPumMenu Pmenu

CocPumShortcut

CocPumShortcut

Source shortcut in completion.

Default: Subdued color Example:

highlight CocPumShortcut ctermfg=245 guifg=#928374
highlight CocPumShortcut ctermfg=243 guifg=#5c6370

CocPumDeprecated

CocPumDeprecated

Deprecated completion items.

Default: Strikethrough Example:

highlight CocPumDeprecated cterm=strikethrough gui=strikethrough
highlight CocPumDeprecated ctermfg=240 guifg=#585858 cterm=strikethrough gui=strikethrough

CocPumVirtualText

CocPumVirtualText

Virtual text in completion menu.

Default: Subdued color Example:

highlight CocPumVirtualText ctermfg=245 guifg=#928374
highlight CocPumVirtualText ctermfg=243 guifg=#5c6370

CocMenuSel

CocMenuSel

Selected completion item.

Default: Selection background Example:

highlight CocMenuSel ctermbg=237 guibg=#3a3a3a
highlight CocMenuSel ctermbg=238 guibg=#3e4452
highlight link CocMenuSel PmenuSel

Symbol Icons (Kind Highlights)

All completion item kinds can be customized. The pattern is CocSymbol{Kind}:

CocSymbolDefault

CocSymbolDefault

Default symbol kind color.

Default: Normal foreground Example:

highlight CocSymbolDefault ctermfg=250 guifg=#abb2bf

Common Symbol Kinds

Highlight GroupDescription
CocSymbolTextPlain text items
CocSymbolMethodMethods and functions
CocSymbolFunctionFunctions
CocSymbolConstructorConstructors
CocSymbolFieldFields and properties
CocSymbolVariableVariables
CocSymbolClassClasses
CocSymbolInterfaceInterfaces
CocSymbolModuleModules and namespaces
CocSymbolPropertyProperties
CocSymbolEnumEnumerations
CocSymbolKeywordKeywords
CocSymbolSnippetSnippets
CocSymbolColorColor values
CocSymbolFileFiles
CocSymbolReferenceReferences
CocSymbolFolderFolders
CocSymbolEnumMemberEnum members
CocSymbolConstantConstants
CocSymbolStructStructures
CocSymbolEventEvents
CocSymbolOperatorOperators
CocSymbolTypeParameterType parameters

Example Configuration:

" Functions and methods in blue
highlight CocSymbolFunction ctermfg=109 guifg=#61afef
highlight CocSymbolMethod ctermfg=109 guifg=#61afef

" Classes and types in yellow
highlight CocSymbolClass ctermfg=214 guifg=#e5c07b
highlight CocSymbolInterface ctermfg=214 guifg=#e5c07b
highlight CocSymbolStruct ctermfg=214 guifg=#e5c07b

" Variables in green
highlight CocSymbolVariable ctermfg=142 guifg=#98c379
highlight CocSymbolProperty ctermfg=142 guifg=#98c379
highlight CocSymbolField ctermfg=142 guifg=#98c379

" Keywords in purple
highlight CocSymbolKeyword ctermfg=170 guifg=#c678dd
highlight CocSymbolOperator ctermfg=170 guifg=#c678dd

Semantic Tokens

Language servers provide semantic tokens for enhanced syntax highlighting. Pattern: CocSem{TokenType}:

Highlight GroupDescription
CocSemNamespaceNamespaces
CocSemTypeTypes
CocSemClassClasses
CocSemEnumEnums
CocSemInterfaceInterfaces
CocSemStructStructs
CocSemTypeParameterType parameters
CocSemParameterParameters
CocSemVariableVariables
CocSemPropertyProperties
CocSemEnumMemberEnum members
CocSemEventEvents
CocSemFunctionFunctions
CocSemMethodMethods
CocSemMacroMacros
CocSemKeywordKeywords
CocSemModifierModifiers
CocSemCommentComments
CocSemStringStrings
CocSemNumberNumbers
CocSemBooleanBooleans
CocSemRegexpRegular expressions
CocSemOperatorOperators
CocSemDecoratorDecorators
CocSemDeprecatedDeprecated items

Example Configuration:

" TypeScript-style semantic colors
highlight CocSemClass ctermfg=214 guifg=#4ec9b0
highlight CocSemInterface ctermfg=214 guifg=#4ec9b0
highlight CocSemType ctermfg=214 guifg=#4ec9b0

highlight CocSemFunction ctermfg=109 guifg=#dcdcaa
highlight CocSemMethod ctermfg=109 guifg=#dcdcaa

highlight CocSemVariable ctermfg=142 guifg=#9cdcfe
highlight CocSemProperty ctermfg=142 guifg=#9cdcfe
highlight CocSemParameter ctermfg=142 guifg=#9cdcfe

highlight CocSemKeyword ctermfg=170 guifg=#c586c0
highlight CocSemModifier ctermfg=170 guifg=#c586c0

highlight CocSemString ctermfg=173 guifg=#ce9178
highlight CocSemNumber ctermfg=180 guifg=#b5cea8
highlight CocSemBoolean ctermfg=180 guifg=#569cd6

highlight CocSemDeprecated cterm=strikethrough gui=strikethrough guifg=#808080

Other Highlights

CocCodeLens

CocCodeLens

CodeLens virtual text (reference counts, implementations, etc).

Default: Subdued color Example:

highlight CocCodeLens ctermfg=245 guifg=#999999
highlight CocCodeLens ctermfg=243 guifg=#5c6370

CocSnippetVisual

CocSnippetVisual

Snippet visual selection.

Default: Visual selection background Example:

highlight CocSnippetVisual ctermbg=237 guibg=#3a3a3a
highlight CocSnippetVisual ctermbg=238 guibg=#3e4452

CocInlayHint

CocInlayHint

Inlay hint virtual text (parameter names, type hints).

Default: Subdued color Example:

highlight CocInlayHint ctermfg=245 guifg=#999999
highlight CocInlayHint ctermfg=243 guifg=#5c6370 cterm=italic gui=italic

Complete Color Scheme Examples

Gruvbox Style

" Diagnostics
highlight CocErrorSign ctermfg=167 guifg=#fb4934
highlight CocWarningSign ctermfg=214 guifg=#fabd2f
highlight CocInfoSign ctermfg=109 guifg=#83a598
highlight CocHintSign ctermfg=142 guifg=#b8bb26

highlight CocErrorHighlight cterm=undercurl gui=undercurl guisp=#fb4934
highlight CocWarningHighlight cterm=undercurl gui=undercurl guisp=#fabd2f

" Document highlights
highlight CocHighlightText ctermbg=237 guibg=#3c3836
highlight CocHighlightRead ctermbg=22 guibg=#2d3a2d
highlight CocHighlightWrite ctermbg=52 guibg=#3a2d2d

" Float windows
highlight CocFloating ctermbg=235 guibg=#282828

" List and completion
highlight CocListLine ctermbg=237 guibg=#3c3836
highlight CocListSearch ctermfg=214 guifg=#fabd2f cterm=bold gui=bold
highlight CocMenuSel ctermbg=237 guibg=#3c3836
highlight CocPumSearch ctermfg=214 guifg=#fabd2f cterm=bold gui=bold

" Symbols
highlight CocSymbolClass ctermfg=214 guifg=#fabd2f
highlight CocSymbolFunction ctermfg=109 guifg=#83a598
highlight CocSymbolVariable ctermfg=142 guifg=#b8bb26

One Dark Style

" Diagnostics
highlight CocErrorSign ctermfg=204 guifg=#e06c75
highlight CocWarningSign ctermfg=214 guifg=#e5c07b
highlight CocInfoSign ctermfg=39 guifg=#61afef
highlight CocHintSign ctermfg=114 guifg=#98c379

highlight CocErrorHighlight cterm=undercurl gui=undercurl guisp=#e06c75
highlight CocWarningHighlight cterm=undercurl gui=undercurl guisp=#e5c07b

" Document highlights
highlight CocHighlightText ctermbg=238 guibg=#3e4452
highlight CocHighlightRead ctermbg=22 guibg=#2d3a2d
highlight CocHighlightWrite ctermbg=52 guibg=#3a2d2d

" Float windows
highlight CocFloating ctermbg=236 guibg=#282c34

" List and completion
highlight CocListLine ctermbg=238 guibg=#3e4452
highlight CocListSearch ctermfg=214 guifg=#e5c07b cterm=bold gui=bold
highlight CocMenuSel ctermbg=238 guibg=#3e4452
highlight CocPumSearch ctermfg=214 guifg=#e5c07b cterm=bold gui=bold

" Symbols
highlight CocSymbolClass ctermfg=214 guifg=#e5c07b
highlight CocSymbolFunction ctermfg=39 guifg=#61afef
highlight CocSymbolVariable ctermfg=114 guifg=#98c379

Dracula Style

" Diagnostics
highlight CocErrorSign ctermfg=204 guifg=#ff5555
highlight CocWarningSign ctermfg=228 guifg=#ffb86c
highlight CocInfoSign ctermfg=117 guifg=#8be9fd
highlight CocHintSign ctermfg=84 guifg=#50fa7b

highlight CocErrorHighlight cterm=undercurl gui=undercurl guisp=#ff5555
highlight CocWarningHighlight cterm=undercurl gui=undercurl guisp=#ffb86c

" Document highlights
highlight CocHighlightText ctermbg=238 guibg=#44475a
highlight CocHighlightRead ctermbg=22 guibg=#2d3a2d
highlight CocHighlightWrite ctermbg=52 guibg=#3a2d2d

" Float windows
highlight CocFloating ctermbg=236 guibg=#282a36

" List and completion
highlight CocListLine ctermbg=238 guibg=#44475a
highlight CocListSearch ctermfg=228 guifg=#f1fa8c cterm=bold gui=bold
highlight CocMenuSel ctermbg=238 guibg=#44475a
highlight CocPumSearch ctermfg=228 guifg=#f1fa8c cterm=bold gui=bold

" Symbols
highlight CocSymbolClass ctermfg=117 guifg=#8be9fd
highlight CocSymbolFunction ctermfg=84 guifg=#50fa7b
highlight CocSymbolVariable ctermfg=228 guifg=#f1fa8c

Minimal Style (Links Only)

" Use existing Vim highlight groups
highlight link CocErrorSign ErrorMsg
highlight link CocWarningSign WarningMsg
highlight link CocInfoSign MoreMsg
highlight link CocHintSign Question

highlight link CocErrorHighlight SpellBad
highlight link CocWarningHighlight SpellCap

highlight link CocHighlightText Visual
highlight link CocFloating Pmenu
highlight link CocMenuSel PmenuSel

" Let colorscheme handle the rest

Error Handling

Terminal Color Support

Check terminal capabilities:

if has('termguicolors')
  set termguicolors
  " Use gui colors
else
  " Use cterm colors only
endif

Fallback Colors

Provide fallbacks for both terminal types:

" Always specify both cterm and gui
highlight CocErrorSign ctermfg=Red guifg=#ff0000

Color Validation

Test highlights are visible:

function! TestHighlights()
  for group in ['CocErrorSign', 'CocWarningSign', 'CocInfoSign']
    let hl = execute('highlight ' . group)
    echo group . ': ' . hl
  endfor
endfunction

Troubleshooting

Problem: Highlights Not Visible

Problem: Diagnostic highlights don't show up.

Solutions:

  1. Check if highlight group is defined:

    :highlight CocErrorHighlight
  2. Verify terminal color support:

    :set termguicolors?
  3. Set explicit colors:

    highlight CocErrorHighlight cterm=undercurl gui=undercurl guisp=#ff0000

Problem: Undercurl Not Working

Problem: Diagnostic undercurls appear as underlines.

Solutions:

  1. Check terminal support:

    • Use a modern terminal (iTerm2, Alacritty, WezTerm)
    • Enable undercurl in terminal settings
  2. Use background instead:

    highlight CocErrorHighlight ctermbg=52 guibg=#5f0000
  3. Use underline as fallback:

    highlight CocErrorHighlight cterm=underline gui=undercurl guisp=#ff0000

Problem: Colors Don't Match Theme

Problem: Coc colors clash with colorscheme.

Solutions:

  1. Link to existing groups:

    highlight link CocErrorSign ErrorMsg
    highlight link CocWarningSign WarningMsg
    highlight link CocFloating Pmenu
  2. Set highlights after colorscheme loads:

    autocmd ColorScheme * call SetCocHighlights()
    
    function! SetCocHighlights()
      highlight CocErrorSign ctermfg=Red guifg=#ff0000
      " ... more highlights
    endfunction
  3. Use colorscheme's palette:

    " Get colors from colorscheme
    let s:red = synIDattr(synIDtrans(hlID('Error')), 'fg', 'gui')
    execute 'highlight CocErrorSign guifg=' . s:red

Problem: Semantic Highlighting Conflicts

Problem: Semantic tokens override syntax highlighting.

Solutions:

  1. Disable semantic tokens:

    {
      "semanticTokens.enable": false
    }
  2. Customize semantic token highlights:

    " Link to existing syntax groups
    highlight link CocSemClass Type
    highlight link CocSemFunction Function
    highlight link CocSemVariable Identifier
  3. Disable for specific filetypes:

    {
      "semanticTokens.filetypes": ["!javascript"]
    }

Problem: Float Window Hard to Read

Problem: Floating windows have poor contrast.

Solutions:

  1. Match popup menu:

    highlight link CocFloating Pmenu
  2. Set explicit background:

    highlight CocFloating ctermbg=235 guibg=#1e1e1e
  3. Add border for contrast:

    let g:coc_borderchars = ['─', '│', '─', '│', '┌', '┐', '┘', '└']

See Also

  • Variables - Configure UI variables
  • Float Windows - Floating window configuration
  • Diagnostics - Diagnostic display options
  • Completion - Completion menu customization
  • List Interface - List appearance options