Dalius's blog

Wednesday, October 14, 2020

Ale + Deoplete + LanguageClient vs CoC

UPDATE: Check “Typescript and ALE” how I have returned to ALE.

Recently I have migrated from Ale + Deoplete + LanguageClient to CoC. I have used first combo for about 6-12 months.

Overall I found CoC to be slightly better. I develop mainly using Typescript so this might not necessary apply to your case.

Here a little things CoC is doing better:

  • I like how CoC shows error. Including the fact that I can press Ctrl-W W to get into error window to copy it (e.g. for Google search).

  • CoC shows not only errors but hints as well from tsserver. Ale is showing only errors (here is pull request for Ale to do this https://github.com/dense-analysis/ale/pull/3362). LanguageClient-neovim shows hints but you can’t navigate them (like in errors/warning in Ale or everything like in CoC).

  • CoC shows colors in CSS by their hex code.

  • CoC offers to fix imports in files on file rename (typescript).

  • Lighter config. It is easier to config CoC only than 3 other plugins.

  • I have not checked this but it is probably that both Ale and LanguageClient launched its own tsserver. That means two runnings servers.

  • I have found CoC plugins quite useful and you can add CoC plugins into your .vimrc. E.g like this:

    let g:coc_global_extensions = [
    \ 'coc-css',
    \ 'coc-emoji',
    \ 'coc-eslint',
    \ 'coc-html',
    \ 'coc-json',
    \ 'coc-prettier',
    \ 'coc-python',
    \ 'coc-tsserver',
    \ 'coc-explorer',
    \ 'coc-markdownlint',
    \ 'coc-vimlsp',
    \ 'coc-word'
    \ ]
  • I have not missed any functionality by migrating to CoC.

So overall CoC looks like very good option. Some people complain that it is slower but I have not experienced that.

Alternatively it is possible to use neovim’s default language servers support but I will leave this for the future.