roxma / nvim-completion-manager

:warning: PLEASE USE https://github.com/ncm2/ncm2 INSTEAD
MIT License
917 stars 49 forks source link

Screenshots, Updates, Announcement #12

Open roxma opened 7 years ago

roxma commented 7 years ago

Inspired by deoplete.

This issue is a good place to upload screenshots for README.md.

Screenshots shoould not be put into git repo, otherwise it will make the plugin download time much much longer .

Additional tips screenshots will also be published in this issued,

Subscribe this issue if you are interested

roxma commented 7 years ago

All in one screenshot

output

roxma commented 7 years ago

Triggering Ultisnips or show popup hints with the same key <c-u>

When the expand key is pressed and nothing has been typed, a popup list for snippets will be triggered.

let g:UltiSnipsExpandTrigger = "<Plug>(ultisnips_expand)"
inoremap <silent> <c-u> <c-r>=cm#sources#ultisnips#trigger_or_popup("\<Plug>(ultisnips_expand)")<cr>

output

roxma commented 7 years ago

Add css completion for inline style attribute:

output

roxma commented 7 years ago

Added C/C++ code completion with clang_complete

output

roxma commented 7 years ago

Just implemented a <c-n><c-x><c-n>... like completion source:

https://github.com/roxma/nvim-completion-manager/issues/24#issuecomment-283635150

Pick a key to map to <Plug>(cm_force_refresh)

imap <c-g> <Plug>(cm_force_refresh)

I also have tab mapping

      " smart tab for auto complete
      inoremap <expr> <silent> <Tab>  pumvisible()?"\<C-n>":"\<TAB>"
      inoremap <expr> <silent> <S-TAB>  pumvisible()?"\<C-p>":"\<S-TAB>"

<Tab> for selecting the popup item, <c-g> for refreshing the popup menu. So the key pressed in this screencast is <TAB><c-g><TAB><c-g>...

output

roxma commented 7 years ago

copied from https://github.com/neovim/neovim/issues/5522#issuecomment-284122091:

Since LanguageClient-neovim already has nice interface, I'm deprecating my previous nvim-cm-php-language-server

Here's a simple php language server package that could be easily setup to work with LanguageClient-neovim, and it is well integrated with nvim-completion-manager

roxma commented 7 years ago

From https://github.com/roxma/nvim-completion-manager/issues/36#issuecomment-284948146:

Just take a deeper look into ultisnips, now parameter expansion works with ultisnips, :smile:

roxma commented 7 years ago

Parameter expandsion for python, javascript, golang, via ultisnips/neosnippet

output

SevereOverfl0w commented 7 years ago

I have just finished adding NCM support to https://github.com/clojure-vim/async-clj-omni for Fireplace only. Acid.nvim will soon be supported also, once I have performed some refactoring.

This brings Clojure support to NCM.

There is currently no caching of completions, but there is contention between the underlying engine & NCM. I have some ideas of how to bring them together though, so expect caching as an upcoming feature.

roxma commented 7 years ago

Rust completion:

I've been learning rust recently and just implemented a completion plugin based on racer last night. I'm not sure I'm getting racer working the right way. It works but I still miss the macro completion.

https://github.com/roxma/nvim-cm-racer

output

roxma commented 7 years ago

Thanks to @lervag and @Shougo, vimscript completion is available via neco-vim

dafufer commented 7 years ago

I have added simple Swift completion using sourcekitten: nvim-cm-swift-completer Any suggestion to improve it is welcome

screencast

jsfaint commented 7 years ago

gtags complete source gen_tags.vim gtags source

jsfaint commented 7 years ago

I added ncm source for neco-syntax Thanks @shougo, the source was already merged into neco-syntax neco-syntax

jsfaint commented 7 years ago

I also add neoinclude support too.

But I'm a little confused about the source priority that which one should be higher? neoinclude(file include) or neco-syntax(language syntax) Currently I give 8 to both of them. neco-syntax mod was already merged to Shougo's repository, but neoinclude mod is not merged yet.

neoinclude screenshot here: neoinclude

roxma commented 7 years ago

@jsfaint

But I'm a little confused about the source priority that which one should be higher? neoinclude(file include) or neco-syntax(language syntax)

It seems they don't usually apear at the same time. So it doesn't matter.

jsfaint commented 7 years ago

@roxma Got it, thanks for your clarification 👍 I'll create PR for neoinclude

roxma commented 7 years ago

https://github.com/roxma/ncm-github Github completion is added. The idea was borrowed from https://github.com/rhysd/github-complete.vim . thanks to @rhysd and @ahmedelgabri #92

I re-implement it in python, so that the sources should work asynchronously.

roxma commented 7 years ago
let g:cm_matcher = {'module': 'cm_matchers.substr_matcher', 'case': 'smartcase'}

Added sub-string based mathing.

roxma commented 7 years ago

Added a toy project: ncm-phpactor

roxma commented 7 years ago

Another plugin ncm-clang for c/c++ completion. This project deprecates roxma/clang_complete

roxma commented 7 years ago

Adding typescript source: https://github.com/mhartington/nvim-typescript/pull/81

gaalcaras commented 6 years ago

I've created a source for the R language: https://github.com/gaalcaras/ncm-R

fullscreen screencast

Please note that Nvim-R is required for ncm-R to work.

cyansprite commented 6 years ago

support for NCM now CS https://github.com/cyansprite/omnisharp.nvim

roxma commented 6 years ago

I'm sorry to announce that my interest moves to some other projects, due to lack of time I may not update this repo for a long while.

If anyone wants to keep a well-maintained fork, post your link here. I'll put it on top of the README page.

mfussenegger commented 6 years ago

@roxma Do you think ncm stilll has any significant advantages over deoplete to make it worth maintaining it or would you recommend people to move over to deoplete in the long run?

andreyorst commented 6 years ago

@mfussenegger it has advantages over deoplete?

coachshea commented 6 years ago

I think it has advantages of every other completion manager out there. I sincerely hope someone takes it on

-- John Shea Cell: 617-605-5763 Email: coachshea@fastmail.com

On Apr 18, 2018, at 3:15 PM, Andrey Orst notifications@github.com wrote:

@mfussenegger it has advantages over deoplete?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

nhooyr commented 6 years ago

@coachshea not that I do not believe ncm has no advantages, could you elaborate on what the advantages are compared to deoplete?

coachshea commented 6 years ago

@nhooyr, I should have been a little more careful with my language. Of course, I have more experience with some systems than others. I have just loved my experience with ncm and am sad to see it -- possibly -- come to an end. I did try deoplete several years ago and I don't remember specifically why I didn't stay with it. All I do know is that I tried several at the time and chose to stick with YCM. I was by and large happy with YCM and never thought I would try another, but for a variety of reasons, I gave ncm a shot, and I instantly loved it. I made the switch and never (until now) looked back. I'll list some of what I love best about it. It is certainly possible that deoplete, or some other completion manager has similar features and maybe I will have to give it a try again.

First, the start up time is instantaneous. One of my few complaints about YCM was startup time. There are a lot of things I liked about the completions, but maybe most of all was the "on-the-fly" snippet creation. I also loved that you could choose regular or fuzzy completion, and how easy it was for others to create add-ons for other filetypes (I realize that in that regard deoplete is similar).

lervag commented 6 years ago

I agree that ncm has been great. I had similar experiences as @coachshea a couple of years ago. However, after trying out deoplete now I have to admit that I can't remember why I didn't stick with it the last time. It seems to work great now.

andreyorst commented 6 years ago

One of my few complaints about YCM was startup time

@coachshea well I believe that the case long startup time of YCM is: image

most of all was the "on-the-fly" snippet creation

Can agree here, it's like the only advantage of NCM over Deoplete for me. However, Language servers are providing snippets too. Only need to wait when snippet managers start supporting it. I'm waiting to try another Shougo's plugin Deoppet because it will support it as far as I know.

partounian commented 6 years ago

Thank you for all your vim work so far it's amazing. I hope someone can pick up this project, I'll have to check out deoplete again but this project and your other work seemed to integrate a lot more easily than competitors.

jirgn commented 6 years ago

I just wanted to switch to deoplete, and first thing I noticed - there is no function param expansion (at least not with ultisnips) or I did not find it. That feature I will miss a lot. I did not even notice the good job you did here, until you quit maintainance - thanx for your work so far. Hopefully there will be anybody to keep this codebase alive.

partounian commented 6 years ago

I would like to take a stab at maintaining this project. If you could give me some direction, I'd love to contribute and see if I can handle this project.

filipekiss commented 6 years ago

@partounian If you need any help count me in! I'd love to help keep NCM alive

partounian commented 6 years ago

Maybe tag what would be a great first issue to tackle? @filipekiss @roxma

Shougo commented 6 years ago

@jirgn You need to install neosnippet for it.

jirgn commented 6 years ago

@Shougo - I tried deoplete again, now with neosnippet, but can't get this feature to work. What I expected is, when having a completion candidate e.g a function selected in pum, just hit the mapping key for neosnippet expansion, and then the function signature params are expanded. These params act as snippet marks $1 - $n and i can navigate through them. If you can tell me how to configure this in your setup, i'll give it another try.

Shougo commented 6 years ago

@jirgn It can. If it does not work, please create the issue in neosnippet. I will test it.

Note: The minimal vimrc and the reproduce instructions are required.

leotaku commented 6 years ago

@partounian Are you still interested in maintaining this project? I still think ncm is the best completion framework out there and would hate to see it die.

epheien commented 6 years ago

on windows, ncm is faster than deoplete

roxma commented 6 years ago

Recently I started to work on ncm2. It is still WIP, and it is far from complete.

The code is based on ncm but many behaviors has changed. All sources will be moved out and it is not going to be compatible with existing source. Snippet integration is going to be a standalone plugin.

I want it to be easier to integrate with other features/plugins, such as go-to-definition and so-on. And I'm going to have some funny idea to try, e.g. ncm2-highlight-double-stuck

It's easier to rewrite the code without legacy concerns, and with some evil premature optimizations removed.

megalithic commented 6 years ago

@roxma yay! good luck and can't wait to check it out.

HerringtonDarkholme commented 6 years ago

@roxma So glad to see you back!

andreyorst commented 6 years ago

@roxma Great to hear see that! Are you planning on adding support of LSP snippets into that snippet plugin you're talking about?

roxma commented 6 years ago

@andreyorst

Are you planning on adding support of LSP snippets into that snippet plugin you're talking about?

Yes

partounian commented 6 years ago

Any way I can help with this new development? @roxma

roxma commented 6 years ago

@partounian

There're priorities of porting ncm sources to ncm2.

So far, I mostly use C/C++ at work, and with some js/css/html, I tend to use python and rust for my side projects.

I'll port these sources ASAP, and I'm going to extend the C/C++ support plugin. At least , I'm expecting it to be the same level of YCM.

As for other sources, it's kind of low priority for me. You could pick the one you need the most and try porting/implementing it with ncm2.

The documentation is not yet ready, but https://github.com/ncm2/ncm2-bufword is probably a good small reference.

partounian commented 6 years ago

I'll try to take a stab at python support 😄