bmewburn / vscode-intelephense

PHP intellisense for Visual Studio Code
https://intelephense.com
Other
1.63k stars 94 forks source link

Omnifunc returned bad value to YCM! b'Keyboard interrupt #298

Closed zlianon closed 5 years ago

zlianon commented 5 years ago

YouCompleteMe + vim-lsp + intelephense = Omnifunc returned bad value to YCM! b'Keyboard interrupt...

Any ideas how to fix this problem?

With intelephense-server all works fine but only cache not made...

Error message show up when type e.g. public func... then get a error, and server stuck.

Sorry for my bad English.

bmewburn commented 5 years ago

Can you add the code where this problem occurs?

ghost commented 5 years ago

I'm using this with vim-lsp and ncm2 without any issues.

can you post your configuration?

zlianon commented 5 years ago

@carlevison

My Neovim configuration.

" ========== Plugins ==========
if !empty(glob('~/.local/share/nvim/site/autoload/plug.vim'))
    call plug#begin('~/.config/nvim/plugged')

    " Autocomplete
    Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
    Plug 'deoplete-plugins/deoplete-docker'
    Plug 'prabirshrestha/async.vim'
    Plug 'prabirshrestha/vim-lsp'
    Plug 'Valloric/YouCompleteMe'
    Plug 'othree/csscomplete.vim'
    Plug 'Raimondi/delimitMate'
    Plug 'Shougo/echodoc.vim'
    Plug 'Shougo/neco-vim'
    Plug 'mattn/emmet-vim'

    " Navigation
    Plug 'scrooloose/nerdtree'
    Plug 'ctrlpvim/ctrlp.vim'

    " Statusbar
    Plug 'vim-airline/vim-airline-themes'
    Plug 'vim-airline/vim-airline'

    " Syntax
    Plug 'leafgarland/typescript-vim'
    Plug 'vim-python/python-syntax'
    Plug 'pangloss/vim-javascript'
    Plug 'tmux-plugins/vim-tmux'
    Plug 'bfrg/vim-cpp-modern'
    Plug 'othree/html5.vim'
    Plug 'elzr/vim-json'

    " Tools
    Plug 'majutsushi/tagbar'
    Plug 'neomake/neomake'
    Plug 'mbbill/undotree'
    Plug 'brooth/far.vim'

    " Theme
    Plug 'morhetz/gruvbox'

    call plug#end()
endif

" ========== Autocommands ==========
autocmd FileType javascript,typescript,json,html,css,cpp,c
    \ setlocal softtabstop=2 shiftwidth=2 tabstop=2

" ========== Settings ==========
set completeopt=noinsert,noselect,menuone
set completeopt-=preview

set background=dark
set shortmess+=Ic
set shell=bash

set regexpengine=1
set updatetime=200
set softtabstop=4
set shiftwidth=4
set laststatus=0
set pumheight=15
set tabstop=4

set nocursorcolumn
set nocursorline
set smartindent
set autoindent
set noshowmode
set lazyredraw
set nohlsearch
set noswapfile
set ignorecase
set noshowcmd
set expandtab
set autowrite
set autoread
set nobackup
set hidden
set nowrap
set number
set noro

" ========== Maps ==========
nmap <silent><c-q> :bp<cr>:bd#<cr>
nmap <silent><c-s> :w<cr>

nmap <c-right> <c-w>l
nmap <c-down> <c-w>j
nmap <c-left> <c-w>h
nmap <c-up> <c-w>k

nmap <s-right> dw
nmap <s-left> dvb

" ========== YouCompleteMe ==========
if globpath(&runtimepath, 'autoload/youcompleteme.vim') !=# ''
    autocmd WinEnter,BufEnter *
        \ if &filetype == 'html' |
        \   let g:ycm_complete_in_strings = 1 |
        \ else |
        \   let g:ycm_complete_in_strings = 0

    nmap <silent><leader>dc :YcmCompleter GoToDeclaration<cr>
    nmap <silent><leader>df :YcmCompleter GoToDefinition<cr>

    for clangd in ['clangd-8', 'clangd-7', 'clangd']
        if executable(clangd)
            let g:ycm_clangd_binary_path = clangd
            break
        endif

        let g:ycm_clangd_binary_path = ''
    endfor

    if empty(g:ycm_clangd_binary_path)
        if globpath(&runtimepath, 'third_party/ycmd/.ycm_extra_conf.py') !=# ''
            let g:ycm_global_ycm_extra_conf = globpath(&runtimepath, 'third_party/ycmd/.ycm_extra_conf.py')
        endif
    endif

    let g:ycm_clangd_uses_ycmd_caching = 0
    let g:ycm_use_clangd = 'Always'

    let g:ycm_enable_diagnostic_highlighting = 0
    let g:ycm_enable_diagnostic_signs = 0
    let g:ycm_echo_current_diagnostic = 0
    let g:ycm_show_diagnostics_ui = 0

    let g:ycm_semantic_triggers = {
        \ 'javascript,typescript,python,html,php,css,cpp,c': ['re!\w{2}']
        \ }
    let g:ycm_filetype_blacklist = {
        \ 'dockerfile': 1, 'vim': 1
        \ }
endif

" ========== DelimitMate ==========
if globpath(&runtimepath, 'autoload/delimitMate.vim') !=# ''
    imap <expr><cr> pumvisible() ? '<c-y>' : '<Plug>delimitMateCR'

    let g:delimitMate_expand_inside_quotes = 0
    let g:delimitMate_expand_space = 1
    let g:delimitMate_expand_cr = 1
endif

" ========== NerdTree ==========
if globpath(&runtimepath, 'autoload/nerdtree.vim') !=# ''
    nmap <silent><c-n> :NERDTreeToggle<cr>

    let NERDTreeAutoDeleteBuffer = 1
    let NERDTreeMinimalUI = 1
endif

" ========== Deoplete ==========
if globpath(&runtimepath, 'autoload/deoplete.vim') !=# ''
    autocmd WinEnter,BufEnter *
        \ if index(['dockerfile', 'vim'], &filetype) < 0 |
        \   call deoplete#disable() |
        \ else |
        \   call deoplete#enable()

    call deoplete#custom#source('_', 'max_menu_width', 0)
    call deoplete#custom#source('_', 'max_abbr_width', 0)
    call deoplete#custom#source('_', 'max_kind_width', 0)

    call deoplete#custom#option('ignore_sources', {
        \ '_': ['dictionary', 'buffer', 'around', 'member', 'omni', 'file', 'tag']
        \ })
    call deoplete#custom#option({
        \ 'auto_complete_delay': 10,
        \ 'auto_refresh_delay': 5,
        \
        \ 'smart_case': v:true
        \ })
endif

" ========== UndoTree ==========
if globpath(&runtimepath, 'autoload/undotree.vim') !=# ''
    nmap <silent><f5> :UndotreeToggle<cr>

    if has('persistent_undo')
        set undodir=$HOME/.undodir
        set undofile
    endif

    let g:undotree_SetFocusWhenToggle = 1
    let g:undotree_WindowLayout = 3
endif

" ========== Neomake ==========
if globpath(&runtimepath, 'autoload/neomake.vim') !=# ''
    autocmd FileType javascript,typescript,python,cpp,c
        \ call neomake#configure#automake('w') |
        \
        \ nmap <silent><pagedown> :lnext<cr> |
        \ nmap <silent><pageup> :lprev<cr>

    let g:neomake_javascript_enabled_makers = ['eslint']
    let g:neomake_typescript_enabled_makers = ['tslint']
    let g:neomake_python_enabled_makers = ['flake8']
    let g:neomake_cpp_enabled_makers = ['gcc']
    let g:neomake_c_enabled_makers = ['gcc']

    let g:neomake_cursormoved_delay = 0
    let g:neomake_open_list = 2
endif

" ========== Echodoc ==========
if globpath(&runtimepath, 'autoload/echodoc.vim') !=# ''
    let g:echodoc#enable_at_startup = 1
endif

" ========== AirLine ==========
if globpath(&runtimepath, 'autoload/airline.vim') !=# ''
    let g:airline_powerline_fonts = 1
endif

" ========== Python ==========
if globpath(&runtimepath, 'syntax/python.vim') !=# ''
    let g:python_highlight_all = 1
endif

" ========== Tagbar ==========
if globpath(&runtimepath, 'autoload/tagbar.vim') !=# ''
    nmap <silent><f8> :TagbarToggle<cr>
endif

" ========== CtrlP ==========
if globpath(&runtimepath, 'autoload/ctrlp.vim') !=# ''
    let g:ctrlp_map = '<c-p>'

    let g:ctrlp_custom_ignore = {
        \ 'file': '\v\.(tar.gz|tar.xz|tar.bz2|tar|zip|rar|iso|jar|dll|exe|so)$',
        \ 'dir': '\v[\/](node_modules|vendor|build)|(\.(vscode|idea|git))$'
        \ }
endif

" ========== Emmet ==========
if globpath(&runtimepath, 'autoload/emmet.vim') !=# ''
    autocmd FileType html,css EmmetInstall

    let g:user_emmet_install_global = 0

    let g:user_emmet_leader_key = '<c-e>'
    let g:user_emmet_mode = 'in'
endif

" ========== Theme ==========
if globpath(&runtimepath, 'colors/gruvbox.vim') !=# ''
    let g:gruvbox_contrast_dark = 'hard'

    colorscheme gruvbox
    syntax enable
endif

" ========== LSP ==========
if globpath(&runtimepath, 'autoload/lsp.vim') !=# ''
    autocmd FileType php setlocal omnifunc=lsp#complete

    autocmd User lsp_setup call lsp#register_server({
        \ 'name': 'intelephense',
        \ 'cmd': {server_info->['node', expand('~/.npm-global/lib/node_modules/intelephense/lib/intelephense.js'), '--stdio']},
        \ 'initialization_options': {"storagePath": "/tmp/intelephense"},
        \ 'whitelist': ['php'],
        \ })
endif
zlianon commented 5 years ago

@bmewburn

Debug info from YCM

2019-03-04 12:29:27,299 - INFO - Received ready request 2019-03-04 12:29:27,313 - INFO - Received event notification 2019-03-04 12:29:27,314 - ERROR - Semantic completion not available for [u'php'] Traceback (most recent call last): File "/home/zlianon/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/server_state.py", line 98, in FiletypeCompletionAvailable self.GetFiletypeCompleter( filetypes ) File "/home/zlianon/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/server_state.py", line 87, in GetFiletypeCompleter current_filetypes ) ) ValueError: No semantic completer exists for filetypes: [u'php'] 2019-03-04 12:29:27,326 - INFO - Received event notification 2019-03-04 12:29:27,327 - INFO - Adding buffer identifiers for file: /home/zlianon/index.php 2019-03-04 12:29:27,332 - ERROR - Semantic completion not available for [u'php'] Traceback (most recent call last): File "/home/zlianon/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/server_state.py", line 98, in FiletypeCompletionAvailable self.GetFiletypeCompleter( filetypes ) File "/home/zlianon/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/server_state.py", line 87, in GetFiletypeCompleter current_filetypes ) ) ValueError: No semantic completer exists for filetypes: [u'php'] 2019-03-04 12:29:27,438 - INFO - Received filetype completion available request 2019-03-04 12:29:27,438 - ERROR - Semantic completion not available for [u'php'] Traceback (most recent call last): File "/home/zlianon/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/server_state.py", line 98, in FiletypeCompletionAvailable self.GetFiletypeCompleter( filetypes ) File "/home/zlianon/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/server_state.py", line 87, in GetFiletypeCompleter current_filetypes ) ) ValueError: No semantic completer exists for filetypes: [u'php'] 2019-03-04 12:29:29,398 - INFO - Received event notification 2019-03-04 12:29:29,399 - INFO - Adding buffer identifiers for file: /home/zlianon/index.php 2019-03-04 12:29:29,399 - ERROR - Semantic completion not available for [u'php'] Traceback (most recent call last): File "/home/zlianon/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/server_state.py", line 98, in FiletypeCompletionAvailable self.GetFiletypeCompleter( filetypes ) File "/home/zlianon/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/server_state.py", line 87, in GetFiletypeCompleter current_filetypes ) ) ValueError: No semantic completer exists for filetypes: [u'php'] 2019-03-04 12:29:30,052 - INFO - Received event notification 2019-03-04 12:29:30,053 - ERROR - Semantic completion not available for [u'php'] Traceback (most recent call last): File "/home/zlianon/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/server_state.py", line 98, in FiletypeCompletionAvailable self.GetFiletypeCompleter( filetypes ) File "/home/zlianon/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/server_state.py", line 87, in GetFiletypeCompleter current_filetypes ) ) ValueError: No semantic completer exists for filetypes: [u'php'] 2019-03-04 12:29:30,234 - INFO - Received completion request 2019-03-04 12:29:30,235 - ERROR - Semantic completion not available for [u'php'] Traceback (most recent call last): File "/home/zlianon/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/server_state.py", line 98, in FiletypeCompletionAvailable self.GetFiletypeCompleter( filetypes ) File "/home/zlianon/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/server_state.py", line 87, in GetFiletypeCompleter current_filetypes ) ) ValueError: No semantic completer exists for filetypes: [u'php'] 2019-03-04 12:29:30,490 - INFO - Received filter & sort request 2019-03-04 12:29:30,564 - INFO - Received filter & sort request 2019-03-04 12:29:30,712 - INFO - Received filter & sort request 2019-03-04 12:29:31,373 - INFO - Received event notification 2019-03-04 12:29:31,374 - INFO - Adding ONE buffer identifier for file: /home/zlianon/index.php 2019-03-04 12:29:31,374 - ERROR - Semantic completion not available for [u'php'] Traceback (most recent call last): File "/home/zlianon/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/server_state.py", line 98, in FiletypeCompletionAvailable self.GetFiletypeCompleter( filetypes ) File "/home/zlianon/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/server_state.py", line 87, in GetFiletypeCompleter current_filetypes ) ) ValueError: No semantic completer exists for filetypes: [u'php'] 2019-03-04 12:29:31,385 - INFO - Received completion request 2019-03-04 12:29:31,385 - ERROR - Semantic completion not available for [u'php'] Traceback (most recent call last): File "/home/zlianon/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/server_state.py", line 98, in FiletypeCompletionAvailable self.GetFiletypeCompleter( filetypes ) File "/home/zlianon/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/server_state.py", line 87, in GetFiletypeCompleter current_filetypes ) ) ValueError: No semantic completer exists for filetypes: [u'php'] 2019-03-04 12:29:32,505 - INFO - Received completion request 2019-03-04 12:29:32,506 - ERROR - Semantic completion not available for [u'php'] Traceback (most recent call last): File "/home/zlianon/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/server_state.py", line 98, in FiletypeCompletionAvailable self.GetFiletypeCompleter( filetypes ) File "/home/zlianon/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/server_state.py", line 87, in GetFiletypeCompleter current_filetypes ) ) ValueError: No semantic completer exists for filetypes: [u'php'] 2019-03-04 12:29:33,881 - INFO - Received event notification 2019-03-04 12:29:33,882 - INFO - Adding ONE buffer identifier for file: /home/zlianon/index.php 2019-03-04 12:29:33,882 - ERROR - Semantic completion not available for [u'php'] Traceback (most recent call last): File "/home/zlianon/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/server_state.py", line 98, in FiletypeCompletionAvailable self.GetFiletypeCompleter( filetypes ) File "/home/zlianon/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/server_state.py", line 87, in GetFiletypeCompleter current_filetypes ) ) ValueError: No semantic completer exists for filetypes: [u'php'] 2019-03-04 12:29:33,895 - INFO - Received completion request 2019-03-04 12:29:33,895 - ERROR - Semantic completion not available for [u'php'] Traceback (most recent call last): File "/home/zlianon/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/server_state.py", line 98, in FiletypeCompletionAvailable self.GetFiletypeCompleter( filetypes ) File "/home/zlianon/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/server_state.py", line 87, in GetFiletypeCompleter current_filetypes ) ) ValueError: No semantic completer exists for filetypes: [u'php'] 2019-03-04 12:29:34,078 - INFO - Received completion request 2019-03-04 12:29:34,078 - ERROR - Semantic completion not available for [u'php'] Traceback (most recent call last): File "/home/zlianon/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/server_state.py", line 98, in FiletypeCompletionAvailable self.GetFiletypeCompleter( filetypes ) File "/home/zlianon/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/server_state.py", line 87, in GetFiletypeCompleter current_filetypes ) ) ValueError: No semantic completer exists for filetypes: [u'php'] 2019-03-04 12:29:34,135 - INFO - Received event notification 2019-03-04 12:29:34,135 - INFO - Adding buffer identifiers for file: /home/zlianon/index.php 2019-03-04 12:29:34,136 - ERROR - Semantic completion not available for [u'php'] Traceback (most recent call last): File "/home/zlianon/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/server_state.py", line 98, in FiletypeCompletionAvailable self.GetFiletypeCompleter( filetypes ) File "/home/zlianon/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/server_state.py", line 87, in GetFiletypeCompleter current_filetypes ) ) ValueError: No semantic completer exists for filetypes: [u'php'] 2019-03-04 12:29:34,148 - INFO - Received event notification 2019-03-04 12:29:34,149 - ERROR - Semantic completion not available for [u'php'] Traceback (most recent call last): File "/home/zlianon/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/server_state.py", line 98, in FiletypeCompletionAvailable self.GetFiletypeCompleter( filetypes ) File "/home/zlianon/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/server_state.py", line 87, in GetFiletypeCompleter current_filetypes ) ) ValueError: No semantic completer exists for filetypes: [u'php'] 2019-03-04 12:29:34,160 - INFO - Received event notification 2019-03-04 12:29:34,160 - INFO - Adding buffer identifiers for file: /home/zlianon/index.php 2019-03-04 12:29:34,161 - ERROR - Semantic completion not available for [u'php'] Traceback (most recent call last): File "/home/zlianon/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/server_state.py", line 98, in FiletypeCompletionAvailable self.GetFiletypeCompleter( filetypes ) File "/home/zlianon/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/server_state.py", line 87, in GetFiletypeCompleter current_filetypes ) ) ValueError: No semantic completer exists for filetypes: [u'php'] 2019-03-04 12:29:34,174 - INFO - Received event notification 2019-03-04 12:29:34,175 - ERROR - Semantic completion not available for [u'php'] Traceback (most recent call last): File "/home/zlianon/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/server_state.py", line 98, in FiletypeCompletionAvailable self.GetFiletypeCompleter( filetypes ) File "/home/zlianon/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/server_state.py", line 87, in GetFiletypeCompleter current_filetypes ) ) ValueError: No semantic completer exists for filetypes: [u'php'] 2019-03-04 12:29:34,189 - INFO - Received event notification 2019-03-04 12:29:34,190 - INFO - Adding ONE buffer identifier for file: /home/zlianon/index.php 2019-03-04 12:29:34,190 - ERROR - Semantic completion not available for [u'php'] Traceback (most recent call last): File "/home/zlianon/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/server_state.py", line 98, in FiletypeCompletionAvailable self.GetFiletypeCompleter( filetypes ) File "/home/zlianon/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/server_state.py", line 87, in GetFiletypeCompleter current_filetypes ) ) ValueError: No semantic completer exists for filetypes: [u'php'] 2019-03-04 12:29:35,529 - INFO - Received completion request 2019-03-04 12:29:35,529 - ERROR - Semantic completion not available for [u'php'] Traceback (most recent call last): File "/home/zlianon/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/server_state.py", line 98, in FiletypeCompletionAvailable self.GetFiletypeCompleter( filetypes ) File "/home/zlianon/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/server_state.py", line 87, in GetFiletypeCompleter current_filetypes ) ) ValueError: No semantic completer exists for filetypes: [u'php'] 2019-03-04 12:29:36,651 - INFO - Received event notification 2019-03-04 12:29:36,652 - INFO - Adding ONE buffer identifier for file: /home/zlianon/index.php 2019-03-04 12:29:36,652 - ERROR - Semantic completion not available for [u'php'] Traceback (most recent call last): File "/home/zlianon/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/server_state.py", line 98, in FiletypeCompletionAvailable self.GetFiletypeCompleter( filetypes ) File "/home/zlianon/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/server_state.py", line 87, in GetFiletypeCompleter current_filetypes ) ) ValueError: No semantic completer exists for filetypes: [u'php'] 2019-03-04 12:29:36,661 - INFO - Received completion request 2019-03-04 12:29:36,661 - ERROR - Semantic completion not available for [u'php'] Traceback (most recent call last): File "/home/zlianon/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/server_state.py", line 98, in FiletypeCompletionAvailable self.GetFiletypeCompleter( filetypes ) File "/home/zlianon/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/server_state.py", line 87, in GetFiletypeCompleter current_filetypes ) ) ValueError: No semantic completer exists for filetypes: [u'php'] 2019-03-04 12:29:36,730 - INFO - Received completion request 2019-03-04 12:29:36,735 - ERROR - Semantic completion not available for [u'php'] Traceback (most recent call last): File "/home/zlianon/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/server_state.py", line 98, in FiletypeCompletionAvailable self.GetFiletypeCompleter( filetypes ) File "/home/zlianon/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/server_state.py", line 87, in GetFiletypeCompleter current_filetypes ) ) ValueError: No semantic completer exists for filetypes: [u'php'] 2019-03-04 12:29:36,936 - INFO - Received filter & sort request 2019-03-04 12:29:52,276 - INFO - Received debug info request 2019-03-04 12:29:52,332 - ERROR - Error retrieving completer debug info Traceback (most recent call last): File "/home/zlianon/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/handlers.py", line 234, in DebugInfo request_data ).DebugInfo( request_data ) File "/home/zlianon/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/handlers.py", line 298, in _GetCompleterForRequestData return _server_state.GetFiletypeCompleter( request_data[ 'filetypes' ] ) File "/home/zlianon/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/server_state.py", line 87, in GetFiletypeCompleter current_filetypes ) ) ValueError: No semantic completer exists for filetypes: [u'php'] 2019-03-04 12:29:59,759 - INFO - Received event notification 2019-03-04 12:29:59,764 - INFO - Adding buffer identifiers for file: /home/zlianon/index.php 2019-03-04 12:29:59,765 - ERROR - Semantic completion not available for [u'php'] Traceback (most recent call last): File "/home/zlianon/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/server_state.py", line 98, in FiletypeCompletionAvailable self.GetFiletypeCompleter( filetypes ) File "/home/zlianon/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/server_state.py", line 87, in GetFiletypeCompleter current_filetypes ) ) ValueError: No semantic completer exists for filetypes: [u'php']

zlianon commented 5 years ago

@bmewburn

Completion works fine but only show error when declaring methods

intelephense-server works without any error

With intelephense:

class Test {
   public func // (get a error message: Omnifunc returned bad value to YCM! b'Keyboard)
}

array_ // (get completions)

$pdo = new PDO('blabla', 'blabla', 'blabla');

$pdo-> // (get completions)
bmewburn commented 5 years ago

This is what the server returns in that context:

{
    "items": [
        {
            "label": "function",
            "kind": 14,
            "textEdit": {
                "range": {
                    "start": {
                        "line": 3,
                        "character": 11
                    },
                    "end": {
                        "line": 3,
                        "character": 15
                    }
                },
                "newText": "function"
            },
            "sortText": "function"
        }
    ]
}

The difference between the latest version and the previous intelephense-server is that textEdit is used instead of the deprecated insertText

zlianon commented 5 years ago

@bmewburn

Ok, I'm not very familiar with how the LSP works, but is it possible to solve this problem? The problem is in YCM or?

ghost commented 5 years ago

@mihaelartz There is a pull request pending in vim-lsp to support textEdit you could try that out and see if it solves your problem.

bmewburn commented 5 years ago

Thanks @carlevison . Closing this as I think the server is returning a valid response.