Comments (44)
@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 ;-)
from coc.nvim.
@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>
from coc.nvim.
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.
from coc.nvim.
Thanks for the great work @chemzqm! I've found pyls to be a bit of a pain and look forward to coc.nvim with the Microsoft Python extension!
from coc.nvim.
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.
@theFool32 I've just added support for coc.nvim in tmux-complete (wellle/tmux-complete.vim#84)
from coc.nvim.
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 #9 (comment)
Thanks.
from coc.nvim.
Need lots of tests, but I don't have too much time recently.
from coc.nvim.
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.
from coc.nvim.
does it conflict with the integration of Microsoft/vscode-python?
They could work together, but you may have duplicated complete items.
what's the difference between the sources (vim plugins?) and extensions (node package?)
Coc load sources from viml plugin as extension internally, the source could be implemented in viml as vim plugin, or javascript as node package. The call to viml function could quite slow, and block your typing, so it's recommended to use node module, and it could make use of javascript APIs from coc.
whether there exist a fast and easy way to port something like ncm2-tmux
Not yet, but possible in the feature.
from coc.nvim.
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.
from coc.nvim.
I mean is it posible to add emmet suggestion to the popup menu like vscode?
from coc.nvim.
@kutsan you can use configuration from .vimrc
and ditch coc-settings.json
, check :h coc#config()
, example.
from coc.nvim.
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
from coc.nvim.
I've removed using of g:rooter_patterns
, it's bad idea, new setting coc.preferences.rootPatterns
also added.
from coc.nvim.
@chemzqm I think you also need to change the coc.txt file as well
g:rooter_patterns *g:rooter_patterns*
To specify how to identify a project's root directory >
let g:rooter_patterns = ['Rakefile', '.git/']
<
default to `['.vim/', '.git/', '.hg/', '.projections.json']`
Note: you can specify different project root for
language servers by use `rootPatterns` in
settings.json.
from coc.nvim.
is it possible to support code block detection like ncm2 with ncm2-markdown-subscope ?
from coc.nvim.
@iamcco There is a plan for something like that, but not high priority for now.
from coc.nvim.
Can use it on Win10?
from coc.nvim.
@kdurant it works on my win7, should works on win10 as well.
BTW, there's some issue with vim, using neovim should be fine.
from coc.nvim.
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>"
from coc.nvim.
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.
from coc.nvim.
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?
from coc.nvim.
@chemzqm Any idea if VS Code Debug Protocol will be supported?
from coc.nvim.
@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.
from coc.nvim.
@chemzqm We can take ideas from vim-vebugger. About buttons, we can use denite or quickmenu to provide "buttons".
from coc.nvim.
@chemzqm Would be nice. Actually I use emmet-vim with <c-e>
as leader key.
from coc.nvim.
Is it possible to add semantic highlighting through LSP protocol?
from coc.nvim.
@Moroxus LSP don't have semantic highlight yet, but it's possible for coc to implement.
from coc.nvim.
@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.
from coc.nvim.
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 ?
from coc.nvim.
@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.
from coc.nvim.
@ovidius72 you would put your emoji around here: https://github.com/neoclide/coc.nvim/blob/master/src/util/complete.ts#L72
from coc.nvim.
@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
from coc.nvim.
@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.
from coc.nvim.
@ovidius72 anything is possible, since it's open source, good luck maintaining the patch though.
from coc.nvim.
@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.
from coc.nvim.
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.
from coc.nvim.
A way to change location and name of coc-settings.json
file?
from coc.nvim.
@oblitum Oh, thanks; that was what I wanted in the first place.
from coc.nvim.
@kutsan fyi, updated example, due to breaking changes.
from coc.nvim.
@kutsan fyi, updated example, due to breaking changes.
FWIW, I think all plugin specific global variables should be prefixed with the plugin name, and g:rooter_patterns
should have been called g:coc_root_patterns
instead (besides following docs regarding implementation).
from coc.nvim.
Hello.
The current state is rather confusing for coc.nvim, as there isn't release tags anymore since 08/2019 and compiled state is being pushed to the release branch since then. Given that, does this issue represent anything yet? Should it be closed or is there still plans for reaching 0.1?
from coc.nvim.
Is there going to be a new release? I saw that this issue seems a little bit abandoned. Should we use directly master or just wait for release be updated (talking about production, of course)
from coc.nvim.
@carlosala the release branch, as instructed from readme, doesn't require compilation from user. Each commit in that branch is a release.
from coc.nvim.
Related Issues (20)
- Is it able to open multiple list window. HOT 1
- List not work after some operation HOT 5
- client coc abnormal exit with: 4 HOT 2
- jumpdefinition buffer 1 not created HOT 13
- Add global argument to disable autocommands on CursorMove HOT 6
- change `codeLens.separator` accoding to filetype comment char HOT 2
- Repeated Diagnostic Messages with Verible Language Server HOT 6
- Can't install any plugins if node is installed inside a folder with a space on Windows HOT 2
- How to stop annoying prompt? HOT 1
- golang lsp gofumpt HOT 1
- ✗ coc-html spawn EINVAL / ✗ coc-pyright spawn EINVAL HOT 1
- Explaining why some LSP needs plugins HOT 1
- coc format behavior differently between Neovim and Vim, create unnecessary empty change in neovim. HOT 8
- something about jumpback after gD coc-definition HOT 2
- 打开rust文件时, coc报错 HOT 2
- Hover/docstring information with custom sources HOT 2
- 为什么会代码提示会提示两次? HOT 5
- [coc.nvim] Server languageserver.ccls failed to start: Error: expected rootUri HOT 1
- Failed open exsit file with list in vim
- The text above get seleted automatically HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coc.nvim.