roxma / nvim-completion-manager

:warning: PLEASE USE https://github.com/ncm2/ncm2 INSTEAD
MIT License
917 stars 49 forks source link

HTML completion #115

Closed asilvadesigns closed 7 years ago

asilvadesigns commented 7 years ago

How does one register omnifunc as a source for html completion...

roxma commented 7 years ago

Please refer to the css version described in the README. :help cm#register_source() for more information.

Post your minimal vimrc if you're having trouble integrating omnifunc.

joanasleet commented 6 years ago

I tried to adapt the css example:

au User CmSetup call cm#register_source({'name' : 'cm-html',
        \ 'priority': 9, 
        \ 'scopes': ['html'],
        \ 'scoping': 1,
        \ 'abbreviation': 'html',
        \ 'cm_refresh_patterns':['\w{2,}$',':\s+\w*$'],
        \ 'cm_refresh': {'omnifunc': 'htmlcomplete#CompleteTags'},
        \ })

omnifunc is set to htmlcomplete#CompleteTags What am I doing wrong ? Is there an option to try omnifunc by default if other sources don't yield results ?

EDIT: Got it working, the refresh patterns were't suitable.