For some reason, I get no autocomplete on html and css files. All works well with other languages, for example JS, Ruby or Python. I\'ve spent close to 2h today trying to fix it
Maybe it is in your filepath blacklist as in default.
Quote from: https://github.com/ycm-core/YouCompleteMe/
The
g:ycm_filepath_blacklist
optionThis option controls for which Vim filetypes (see :h filetype) should filepath completion be disabled. The option value should be a Vim dictionary with keys being filetype strings (like python, cpp, etc.) and values being unimportant (the dictionary is used like a hash set, meaning that only the keys matter).
let g:ycm_filepath_blacklist = {'*': 1}
The * key is special and matches all filetypes. Use this key if you want to completely disable filepath completion:
You can get the filetype of the current file in Vim with :set ft?.
Default: [see next line]
let g:ycm_filepath_blacklist = { \ 'html': 1, \ 'jsx': 1, \ 'xml': 1, \}