neoclide / coc-python

Python extension for coc.nvim, fork of vscode-python
574 stars 51 forks source link

How to highlight python symbol and reference of the cursorhold in Neovim #264

Open gao634209276 opened 4 years ago

gao634209276 commented 4 years ago

Can coc-python support the following configuration of coc.nvim?

" Highlight the symbol and its references when holding the cursor.
autocmd CursorHold * silent call CocActionAsync('highlight')

@alcesleo @theangryangel @chemzqm @solly0880

theangryangel commented 4 years ago

I've had a quick search through the source - as far as I can tell coc-python does not yet implement the required DocumentHighlightProvider (https://github.com/neoclide/coc.nvim/blob/fd9e7d3972a5300da2acf648c2f5f23d1983c111/src/provider/index.ts#L459-L480). I may have missed it, but that should be the missing piece.

If I get time one evening I'll see if I can add it quickly. I havent really touched that part of the code before tho.