Setting a file in `~/.vim/bundle/YouCompleteMe/.ycm_extra_conf.py`
import os import ycm_core flags = [ '-std=c++20' ] def Settings ( **kwargs ): return { 'flags': flags }
And the problem solved