Using 100% of CPU whenever I type
I've tried solving this problem myself looking at previous issues and looking into everything I could find but I really have no experience and I have failed to solve it. I hope opening an issue here is the right thing to do.
Observed behavior
ccls with coc.nvim, configuration file includes
"languageserver": {
"ccls": {
"command": "ccls",
"filetypes": ["c", "cpp", "objc", "objcpp"],
"rootPatterns": [".ccls", "compile_commands.json", ".vim/", ".git/", ".hg/"],
"initializationOptions": {
"cache": {
"directory": "/tmp/ccls"
}
}
}
}
node version: 14.18.3
Running on a very small project (learning C++) with this .ccls file
clang++
%h %cpp -std=c++17
Whenever I start writing into the files the CPU usage jumps to 100% from a ccls process. When I stop typing after a while it goes down again. Same happens if I start writing again.
Here's a GIF showing what happens

Expected behavior
Not 100% usage of CPU with everything I type.
System information
- ccls version (
git describe --tags --long): 12.0.0-3ubuntu~21.04.2 - clang version: Ubuntu clang version 12.0.0-3ubuntu1~21.04.2
- OS: Ubuntu 21.04
- Editor: nvim 0.6.1
- Language client (and version): coc.nvim 0.0.80-8874b
EDIT: I have completely formatted my PC in case it was an issue somewhere in my installations, but the same is happening.
one cause maybe neovim watchfile implementation sucks, I mean nvim itself, not ccls high cpu usage