Skip to content
Raidou edited this page Jan 2, 2024 · 10 revisions

How to enable icons?

Enable the option explorer.icon.enableNerdfont in :CocConfig and change your terminal font to one of the Nerdfont.

Use with Yggdroot/indentLine or nathanaelkane/vim-indent-guides

" for vim-indent-guides
let g:indent_guides_exclude_filetypes = ['coc-explorer']

" for indentLine
let g:indentLine_fileTypeExclude = ['coc-explorer']

How to automatically refresh git when gina.vim changed?

function s:gina_change()
  if exists('#User#CocGitStatusChange')
    doautocmd <nomodeline> User CocGitStatusChange
  endif
endfunction
call gina#core#emitter#subscribe('modified', function('s:gina_change'))

I want to apply coc-explorer settings in .vimrc.

Check out the coc.nvim help documentation, :h coc#config() or :h g:coc_user_config

Why is my file icon not colored?

When explorer.icon.source option is vim-devicons or nerdfont.vim doesn't support color. Here is recommended to use https://github.com/lambdalisue/glyph-palette.vim

Otherwise if color is still not displayed, then you need to enable the 24-bit RGB color in vim. The below command may help.

TERM="xterm-256color" vim -c 'set termguicolors | set background=dark'

Failed to install coc-explorer.

Failed to install the trash can or other modules, cause can't install the coc-explorer.

The error message is probably

Error: Cannot find module 'trash'
[coc.nvim] Command: explorer not found

Related issues: https://github.com/weirongxu/coc-explorer/issues/369, https://github.com/weirongxu/coc-explorer/issues/163

Solution: Clear the npm cache and reinstall coc-explorer again

npm cache clean --force