A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/neoclide/coc.nvim/wiki/Using-the-configuration-file below:

Using the configuration file · neoclide/coc.nvim Wiki · GitHub

coc.nvim uses jsonc as configuration file format, the same as VSCode. It's json that supports comments, like:

To get correct comment highlighting, make sure you use a recent Vim (8.2.3117 or later) or NeoVim (0.6.0 or later) version. Alternatively you can install vim-jsonc (which has built-in support for coc-settings.json), or even simply add:

  autocmd FileType json syntax match Comment +\/\/.\+$+

to your .vimrc or init.vim.

Opening the configuration file

Use the command :CocConfig to open your user configuration file, you can create a shortcut for the command like this:

function! SetupCommandAbbrs(from, to)
  exec 'cnoreabbrev <expr> '.a:from
        \ .' ((getcmdtype() ==# ":" && getcmdline() ==# "'.a:from.'")'
        \ .'? ("'.a:to.'") : ("'.a:from.'"))'
endfunction

" Use C to open coc config
call SetupCommandAbbrs('C', 'CocConfig')

Variables would be expanded in string values of configuration, supported variables:

some additional variables see:

:h coc-configuration-expand
Configuration file resolve

To enable intellisense for coc-settings.json, install the json language extension coc-json by:

In your vim.

Checkout :h coc-config for all built in configurations.

Just like VSCode, each coc.nvim extension can contribute configuration sections, for example:

To get detailed options for existing configurations, just try the completion in the file coc-settings.json:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4