Skip to content
Document highlight and document colors support for coc.nvim
Branch: master
Clone or download
Latest commit 00e3cc1 Jul 1, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
server use webpack Jun 17, 2019
src start server on activate Jul 1, 2019
tests add tests Nov 19, 2018
.gitignore works Nov 18, 2018
.npmignore improve npmignore Jun 17, 2019
Readme.md doc Jul 1, 2019
package.json Release 1.2.3 Jul 1, 2019
tsconfig.json use webpack Jun 17, 2019
tslint.json works Nov 18, 2018
webpack.config.js use webpack Jun 17, 2019
yarn.lock use webpack Jun 17, 2019

Readme.md

coc-highlight

Provide default highlight for coc.nvim, including document highlight (highlight of current document symbol) and colors highlight.

Screen Shot 2019-07-01 at 9 11 33 AM

Install

In your vim/neovim, run command:

:CocInstall coc-highlight

Features

  • Highlight symbol of current position in all positions of current buffer (when no document highlight provider exists from language server).
  • Highlight colors of current buffer (when no color provider exists from language server).

Usage

To enable highlight current symbol on CursorHold, add:

autocmd CursorHold * silent call CocActionAsync('highlight')

to your .vimrc.

To disable coc provide color highlight, add:

"coc.preferences.colorSupport": false,

to your settings.json.

To pick a different color, use command:

:call CocAction('pickColor')

Note: only works on Mac or have python gtk module installed.

To pick a different color presentation, use command:

:call CocAction('colorPresentation')

Options

  • highlight.disableLanguages, list of filetypes to ignore for this extension.
  • highlight.document.enable, set to false to disable document symbol highlight.
  • highlight.colors,enable, set to false to disable color highlight.

F.A.Q

Q: Why color highlight is not shown on my vim?

A: First, make sure "coc.preferences.colorSupport" is not false in your coc-settings.json, then make sure you have set termguicolors in your .vimrc, and your terminal support true color.

Q: How to change highlight of the current symbol.

A: All you need is overwrite the highlight group, checkout :h coc-highlights

License

MIT

You can’t perform that action at this time.