coc-python icon indicating copy to clipboard operation
coc-python copied to clipboard

hover not found (python)

Open rodhash opened this issue 5 years ago • 1 comments

Hello,

This plugin worked fine for the most part, I got linting, syntax / completion, etc .. I guess it all worked fine except for hover (shift + K). Installing / Setting either by plugin or manually didn't work for me.

I couldn't make hover work unless enabling MPLS then it worked just fine but at the cost of high CPU usage as reported in other threads / issues.

Also if installing coc-jedi / jedi-languague-server, then it also works fine. Am I missing something and jedi should be installed separetly for this "hover" to work?

ps: I had issues w/ Hover only for Python, it worked in other lang.

Here is my config:

nvim

 ~ ❯ nvim --version
NVIM v0.5.0-654-g3acfefb63
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/cc -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/build/nvim/parts/nvim/build/build/config -I/build/nvim/parts/nvim/build/src -I/build/nvim/parts/nvim/build/.deps/usr/include -I/usr/include -I/build/nvim/parts/nvim/build/build/src/nvim/auto -I/build/nvim/parts/nvim/build/build/include
Compiled by root@lgw01-amd64-012

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

Run :checkhealth for more info

Minimal init

  ~ ❯ cat .config/nvim/minimal.init.vim                                                                                                                 5m 26s

" Plugins
" ***********
call plug#begin('~/.config/nvim/plugged')
    Plug 'neoclide/coc.nvim', {'branch': 'release'}
call plug#end()

" Coc Plugins
let g:coc_global_extensions=[ 'coc-python', 'coc-json', 'coc-vimlsp' ]


" General Config
" ***********
filetype indent plugin on
" set ruler
set number
set relativenumber
set tabstop=2
set shiftwidth=4
set softtabstop=4
let mapleader=","


" Coc config
" *************
set hidden
set nobackup
set nowritebackup
set cmdheight=2
set updatetime=300
set shortmess+=c
set signcolumn=yes
inoremap coc#refresh()

autocmd CursorHold * silent call CocActionAsync('highlight')

nnoremap <silent> K :call <SID>show_documentation()<CR>
function! s:show_documentation()
  if (index(['vim','help'], &filetype) >= 0)
    execute 'h '.expand('<cword>')
  else
    call CocActionAsync('doHover')
  endif
endfunction

Thank you.

rodhash avatar Oct 01 '20 05:10 rodhash

I forgot to mention something..

One downside I found by installing the coc-jedi separately was a bit of performance issue. It's not close to what MPLS did to my PC but still noticed a bit of performance issue if compared to other filetypes such as CSS which has hover feels like instantly popping up... however while coding the completion menus and everything else works smoothly.. only in the hover I noticed that.

Thanks.

rodhash avatar Oct 01 '20 05:10 rodhash