coc.nvim
coc.nvim copied to clipboard
Roadmap for v0.1
Coc is working now, but still lots of work ahead to make it better. Let me know if you have some ideas for it.
- [x] Works in vim.
- [x] Airline/Lightline integration
- [x] Add support for https://github.com/Shougo/neosnippet.vim
- [x] Binary distribution.
- [x] Command for edit coc-settings.json.
- [x] Support lSP feature: document highlight
- [x] Support lSP feature: document link
- [x] Support codeLens feature by using vritual text.
- [x] A coc-emmet extension to help expand emmet in completion menu.
- [x] Integration of Microsoft/vscode-python
is it possible to support code block detection like ncm2 with ncm2-markdown-subscope ?
@iamcco There is a plan for something like that, but not high priority for now.
Can use it on Win10?
@kdurant it works on my win7, should works on win10 as well. BTW, there's some issue with vim, using neovim should be fine.
Microsoft's python-language-server is just released: https://github.com/Microsoft/python-language-server
According to https://github.com/Microsoft/vscode-python/blob/master/src/client/activation/languageServer.ts#L159, the VSCode-python can download LS bin.
could you please consider adding emmet support? so I could use Tab to expand html markup without conflict with coc auto-complete
" Use <Tab> for confirm completion.
" Coc only does snippet and additional edit on confirm.
inoremap <expr> <Tab> pumvisible() ? "\<C-y>" : "\<Tab>"
@sandangel you just need to extend the remap, like:
let g:user_emmet_leader_key = '<C-e>'
let g:user_emmet_expandabbr_key = '<C-x><C-e>'
imap <silent><expr> <Tab> <SID>expand()
function! s:expand()
if pumvisible()
return "\<C-y>"
endif
let col = col('.') - 1
if !col || getline('.')[col - 1] =~# '\s'
return "\<Tab>"
endif
return "\<C-x>\<C-e>"
endfunction
Notice imap
is used here so that you can't let emmet use the mapping for <C-y>
thanks @chemzqm for your tip. However, I mean it would be great if we can add emmet to completion source and only have to use Tab to expand it. With the above tip, we can only expand emmet after close the popup menu.
thanks @chemzqm for your tip. However, I mean it would be great if we can add emmet to completion source and only have to use Tab to expand it. With the above tip, we can only expand emmet after close the popup menu.
I don't understand how could this work, provide a complete item with label like expand emmet
or just expand the complete item if it's confirmed and is not snippet?
I mean is it posible to add emmet suggestion to the popup menu like vscode?
~It's possible by create a custom source, but I don't think it's useful since you can always expand emmet with it's own expand key, and it could be buggy.~
@chemzqm Any idea if VS Code Debug Protocol will be supported?
@adelarsq I've thinked about it, but one big problem is I don't know how to make it easy to use, ex: I can't create buttons in terminal vim.
@chemzqm We can take ideas from vim-vebugger. About buttons, we can use denite or quickmenu to provide "buttons".
there are a bunch of vim debuggers to look at for ideas, here's one which even uses the debug protocol (i haven't used it): https://github.com/puremourning/vimspector
I've experienced with emmet completion in VSCode, I think it's worthy to have it, since it would help to reduce the number of key stroke you need to use for snippet.
@chemzqm Would be nice. Actually I use emmet-vim with <c-e>
as leader key.
Is it possible to add semantic highlighting through LSP protocol?
@Moroxus LSP don't have semantic highlight yet, but it's possible for coc to implement.
Is it possible to add icons in the completion menu, similar to vscode, that distinguish methods, property and snippet ? It's not just an aesthetic matter, it would be helpful to easily find the correct item. Like in this comment https://github.com/neoclide/coc.nvim/issues/9#issuecomment-433677934
Thanks.
@ovidius72 it's possible, through what is available in Unicode and font with colored characters/emoji (plus terminal support of that if you're on terminal), or custom fonts. There's no option for enabling or tweaking that in coc though.
Thanks @oblitum I'm on terminal. I have nerd fonts working fine but unfortunately have no idea where to start. I joined the vim word only a few weeks ago. Can you suggest any tutorial or doc where I can start from ?
@ovidius72 hi, I just meant that it's not impossible, since you can use emoji/unicode/custom-fonts for that, but coc.nvim doesn't provide options for tweaking kind
or other parts of the menu, which may vary depending on language, that's up to @chemzqm or your willing to fork/patch it to put Unicode in it.
@ovidius72 you would put your emoji around here: https://github.com/neoclide/coc.nvim/blob/master/src/util/complete.ts#L72
@ovidius72, for example:
-
cd
~/.vim/plugged/coc.nvim
-
@@ -74,7 +74,7 @@ export function completionKindString(kind: CompletionItemKind): string { case CompletionItemKind.Text: return 'Text' case CompletionItemKind.Method: - return 'Method' + return '📙' case CompletionItemKind.Function: return 'Function' case CompletionItemKind.Constructor:
-
yarn install
-
nvim sample.cpp
@oblitum Wow this is nice. I'll take a look at it as soon as possible. Is it also possible to show them at the left side ? Thanks.
@ovidius72 anything is possible, since it's open source, good luck maintaining the patch though.
@ovidius72 the kind of the completion is generally shown in the middle though, never left-side, it's the way Vim does things, you could try patching it for that but you would be really going against how Vim works, to the point you better stick to vscode.
@oblitum ok, I understand that make sense. And no, i will not give up for this, I'm getting comfortable with vim now and you want me to switch back to vscode for a few icons ;-)
I find the repo coc-jedi, does it conflict with the integration of Microsoft/vscode-python?
BTW, what's the difference between the sources (vim plugins?) and extensions (node package?). I'm new to coc.nvim and vimL, and wonder whether there exist a fast and easy way to port something like ncm2-tmux, ncm2-look and ncm2-en to coc.nvim.
Thanks.