Git Product home page Git Product logo

Comments (44)

ovidius72 avatar ovidius72 commented on May 18, 2024 6

@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.

chemzqm avatar chemzqm commented on May 18, 2024 5

@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.

chemzqm avatar chemzqm commented on May 18, 2024 5

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.

rbpatt2019 avatar rbpatt2019 commented on May 18, 2024 5

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.

kabouzeid avatar kabouzeid commented on May 18, 2024 5

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.

ovidius72 avatar ovidius72 commented on May 18, 2024 4

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.

chemzqm avatar chemzqm commented on May 18, 2024 4

Need lots of tests, but I don't have too much time recently.

from coc.nvim.

chemzqm avatar chemzqm commented on May 18, 2024 3

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.

chemzqm avatar chemzqm commented on May 18, 2024 3

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.

fannheyward avatar fannheyward commented on May 18, 2024 2

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.

sandangel avatar sandangel commented on May 18, 2024 2

I mean is it posible to add emmet suggestion to the popup menu like vscode?

example

from coc.nvim.

oblitum avatar oblitum commented on May 18, 2024 2

@kutsan you can use configuration from .vimrc and ditch coc-settings.json, check :h coc#config(), example.

from coc.nvim.

aeosynth avatar aeosynth commented on May 18, 2024 1

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.

chemzqm avatar chemzqm commented on May 18, 2024 1

I've removed using of g:rooter_patterns, it's bad idea, new setting coc.preferences.rootPatterns also added.

from coc.nvim.

sandangel avatar sandangel commented on May 18, 2024 1

@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.

iamcco avatar iamcco commented on May 18, 2024

is it possible to support code block detection like ncm2 with ncm2-markdown-subscope ?

from coc.nvim.

chemzqm avatar chemzqm commented on May 18, 2024

@iamcco There is a plan for something like that, but not high priority for now.

from coc.nvim.

kdurant avatar kdurant commented on May 18, 2024

Can use it on Win10?

from coc.nvim.

chemzqm avatar chemzqm commented on May 18, 2024

@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.

sandangel avatar sandangel commented on May 18, 2024

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.

sandangel avatar sandangel commented on May 18, 2024

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.

chemzqm avatar chemzqm commented on May 18, 2024

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.

adelarsq avatar adelarsq commented on May 18, 2024

@chemzqm Any idea if VS Code Debug Protocol will be supported?

from coc.nvim.

chemzqm avatar chemzqm commented on May 18, 2024

@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.

adelarsq avatar adelarsq commented on May 18, 2024

@chemzqm We can take ideas from vim-vebugger. About buttons, we can use denite or quickmenu to provide "buttons".

from coc.nvim.

adelarsq avatar adelarsq commented on May 18, 2024

@chemzqm Would be nice. Actually I use emmet-vim with <c-e> as leader key.

from coc.nvim.

Moroxus avatar Moroxus commented on May 18, 2024

Is it possible to add semantic highlighting through LSP protocol?

from coc.nvim.

chemzqm avatar chemzqm commented on May 18, 2024

@Moroxus LSP don't have semantic highlight yet, but it's possible for coc to implement.

from coc.nvim.

oblitum avatar oblitum commented on May 18, 2024

@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.

ovidius72 avatar ovidius72 commented on May 18, 2024

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.

oblitum avatar oblitum commented on May 18, 2024

@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.

oblitum avatar oblitum commented on May 18, 2024

@ovidius72 you would put your emoji around here: https://github.com/neoclide/coc.nvim/blob/master/src/util/complete.ts#L72

from coc.nvim.

oblitum avatar oblitum commented on May 18, 2024

@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
    imgur-21 03 08_28-12-2018

from coc.nvim.

ovidius72 avatar ovidius72 commented on May 18, 2024

@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.

oblitum avatar oblitum commented on May 18, 2024

@ovidius72 anything is possible, since it's open source, good luck maintaining the patch though.

from coc.nvim.

oblitum avatar oblitum commented on May 18, 2024

@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.

theFool32 avatar theFool32 commented on May 18, 2024

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.

kutsan avatar kutsan commented on May 18, 2024

A way to change location and name of coc-settings.json file?

from coc.nvim.

kutsan avatar kutsan commented on May 18, 2024

@oblitum Oh, thanks; that was what I wanted in the first place.

from coc.nvim.

oblitum avatar oblitum commented on May 18, 2024

@kutsan fyi, updated example, due to breaking changes.

from coc.nvim.

oblitum avatar oblitum commented on May 18, 2024

@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.

oblitum avatar oblitum commented on May 18, 2024

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.

carlosala avatar carlosala commented on May 18, 2024

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.

oblitum avatar oblitum commented on May 18, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.