roxma / nvim-completion-manager

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

css completion in html stop working #28

Closed casprwang closed 7 years ago

casprwang commented 7 years ago

2017-02-26 19 54 31

Minified vimrc:

Plug 'othree/csscomplete.vim'
Plug 'roxma/nvim-completion-manager', {'do': 'npm install'}
Plug 'roxma/nvim-cm-php-language-server',  {'do': 'composer install && composer run-script parse-stubs'}
Plug 'roxma/nvim-cm-tern',  {'do': 'npm install'}
Plug 'ternjs/tern_for_vim'

" NCM {{{
" ----------------------------------------------------------------------------
set shortmess+=c
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
let g:UltiSnipsExpandTrigger = "<Plug>(ultisnips_expand)"
" css
" the omnifunc pattern is PCRE
let g:cm_matcher = {'module': 'cm_matchers.fuzzy_matcher', 'case': 'smartcase'}
au User CmSetup call cm#register_source({'name' : 'cm-css',
        \ 'priority': 9, 
        \ 'scopes': ['css', 'scss'],
        \ 'abbreviation': 'css',
        \ 'cm_refresh_patterns':['\w{2,}$',':\s+\w*$'],
        \ 'cm_refresh': {'omnifunc': 'csscomplete#CompleteCSS'},
        \ })
let g:cm_sources_override = {
    \ 'cm-tags': {'enable':0}
    \ }

inoremap <silent> <c-o> <c-r>=cm#sources#ultisnips#trigger_or_popup("\<Plug>(ultisnips_expand)")<cr>
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
" }}}

Check Health

health#jedi#check
========================================================================
## jedi
#### Jedi-vim debug information
Using Python version: 2
 - sys.version: 2.7.10 (default, Jul 30 2016, 19:40:32), [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)]
 - site module: /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.pyc
Jedi path: /Users/wangsong/dotfiles/nvim/bundle/jedi-vim/jedi/jedi/__init__.pyc
 - version: 0.10.0
 - sys_path:
    - /Users/wangsong/dotfiles/nvim/bundle/jedi-vim
    - /Library/Python/2.7/site-packages/virtualenv-15.1.0-py2.7.egg
    - /Library/Python/2.7/site-packages/pyproj-1.9.5.1-py2.7-macosx-10.12-intel.egg
    - /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip
    - /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
    - /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin
    - /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac
    - /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages
    - /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk
    - /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old
    - /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload
    - /Users/wangsong/Library/Python/2.7/lib/python/site-packages
    - /Library/Python/2.7/site-packages
    - /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python
    - /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC
    - _vim_path_
    - /Users/wangsong/dotfiles/.vim/bundle/vim-virtualenv/autoload
    - /Users/wangsong/dotfiles/nvim/bundle/MatchTagAlways/autoload/../python
jedi-vim git version: 0.8.0-73-g682f377
jedi git submodule status:  70200861661a921016563717487c1ced9993acdb jedi (v0.10.0)

##### Settings

g:force_py_version = '2' (default: 'auto')

  omnifunc=emmet#completeTag
    Last set from ~/dotfiles/nvim/init.vim
  completeopt=menu,menuone,noinsert,noselect
    Last set from ~/.local/share/nvim/plugged/nvim-completion-manager/autoload/cm.vim

health#nvim#check
========================================================================
## Configuration
  - SUCCESS: no issues found

## Performance
  - SUCCESS: Build type: RelWithDebInfo

## Remote Plugins
  - SUCCESS: Up to date

## terminfo
  - ERROR: key_backspace (kbs) entry is ^H (ASCII DELETE): key_backspace=^H,
    - SUGGESTIONS:
      - Set key_backspace to \177 (ASCII BACKSPACE). Run these commands:
          infocmp $TERM | sed 's/kbs=^[hH]/kbs=\\177/' > $TERM.ti
          tic $TERM.ti
      - See https://github.com/neovim/neovim/wiki/FAQ

## tmux
  - SUCCESS: escape-time: [warn]kq_init:detectedbrokenkqueue;notusing.:Undefinederror:00ms
  - INFO: $TERM: screen-256color

health#provider#check
========================================================================
## Clipboard
  - SUCCESS: Clipboard tool found: pbcopy

## Python 2 provider
  - INFO: Using: g:python_host_prog = "/usr/bin/python"
  - INFO: Executable: /usr/bin/python
  - INFO: Python2 version: 2.7.10
  - INFO: python-neovim version: 0.1.13
  - SUCCESS: Latest python-neovim is installed: 0.1.13

## Python 3 provider
  - INFO: Using: g:python3_host_prog = "/usr/local/bin/python3"
  - INFO: Executable: /usr/local/bin/python3
  - INFO: Python3 version: 3.5.2
  - INFO: python3-neovim version: 0.1.13
  - SUCCESS: Latest python3-neovim is installed: 0.1.13

## Ruby provider
  - SUCCESS: Found up-to-date neovim RubyGem
  - INFO: Ruby Version: ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]
  - INFO: Host Executable: /usr/local/bin/neovim-ruby-host
  - INFO: Host Version: 0.3.1
roxma commented 7 years ago

Add 'scoping': 1 here

Sorry I haven't update the README yet. Not all sources support this feature, so I decided to add an option to enalbe it explicitly.

au User CmSetup call cm#register_source({'name' : 'cm-css',
        \ 'priority': 9, 
        \ 'scopes': ['css', 'scss'],
        \ 'scoping': 1,
        \ 'abbreviation': 'css',
        \ 'cm_refresh_patterns':['\w{2,}$',':\s+\w*$'],
        \ 'cm_refresh': {'omnifunc': 'csscomplete#CompleteCSS'},
        \ })
casprwang commented 7 years ago

Nice! I suggest we set the default to 1 in this case, which makes more sense for html editing.