7

I recently moved from ALE to coc.nvim as the intellisense was not that great with ALE. But i see one problem with the error or warnings popup. The cursor needing to be exactly on the underlined error.

Is there a way i can make coc show the popup no matter where the cursor is on the line?

I know i can use the commands to goto next and prev error. But i think this would make some things easier.

Adithya Sama
  • 345
  • 3
  • 16

3 Answers3

11

In your coc-settings.json file write:

{
 "diagnostic.checkCurrentLine": true
}

coc-settings.json can be found in ~/.vim/coc-settings.json

OR

in vim type :CocConfig to go to that file

fuadnafiz98
  • 450
  • 5
  • 15
8

In your coc-settings.json file (you can type :CocConfig if you are already in Vim as the other answer stated) add the following lines:

{
  ...
  "diagnostic.virtualText": true,
  "diagnostic.virtualTextCurrentLineOnly": false
}

Then close your vim instance and open it again or type :CocRestart to restart Coc. You should see coc's errors and warnings even if you are not stepping in that line.

tanoserio
  • 125
  • 2
  • 8