All Projects → ncm2 → Ncm2

ncm2 / Ncm2

Licence: mit
❤️ Slim, Fast and Hackable Completion Framework for Neovim

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Ncm2

Nvim Completion Manager
⚠️ PLEASE USE https://github.com/ncm2/ncm2 INSTEAD
Stars: ✭ 950 (-20.7%)
Mutual labels:  neovim, completion
Vim Ultest
The ultimate testing plugin for (Neo)Vim
Stars: ✭ 70 (-94.16%)
Mutual labels:  neovim
Ngautocomplete
Light-weight autocomplete component for Angular.
Stars: ✭ 52 (-95.66%)
Mutual labels:  completion
Icomplete Vertical
Global Emacs minor mode to display icomplete candidates vertically
Stars: ✭ 66 (-94.49%)
Mutual labels:  completion
Vim Crates
Handle Cargo dependencies like a Rustavimean.
Stars: ✭ 54 (-95.49%)
Mutual labels:  neovim
Dotfiles
🏡 dotfiles
Stars: ✭ 66 (-94.49%)
Mutual labels:  neovim
Idempotent Desktop
🛸 NixOS, Xmonad, Neovim
Stars: ✭ 51 (-95.74%)
Mutual labels:  neovim
Coc Vimtex
vimtex integration for coc.nvim
Stars: ✭ 74 (-93.82%)
Mutual labels:  neovim
Dotfiles
Workstation configuration, provisioning and tools
Stars: ✭ 67 (-94.41%)
Mutual labels:  neovim
Highlight.lua
a neovim syntax highlighter using treesitter
Stars: ✭ 65 (-94.57%)
Mutual labels:  neovim
Dotfiles
🏠
Stars: ✭ 60 (-94.99%)
Mutual labels:  neovim
Nvim Hlslens
Hlsearch Lens for Neovim
Stars: ✭ 55 (-95.41%)
Mutual labels:  neovim
Nvim Treesitter
Nvim Treesitter configurations and abstraction layer
Stars: ✭ 1,129 (-5.76%)
Mutual labels:  neovim
Emacs Fish Completion
[MOVED TO GITLAB]
Stars: ✭ 53 (-95.58%)
Mutual labels:  completion
Neoline.vim
Status Line for Neovim focused on beauty and performance ✅
Stars: ✭ 69 (-94.24%)
Mutual labels:  neovim
Neovim Qt
Neovim client library and GUI, in Qt5.
Stars: ✭ 1,057 (-11.77%)
Mutual labels:  neovim
Dotfiles
My Neovim + Tmux + Zsh dev setup
Stars: ✭ 60 (-94.99%)
Mutual labels:  neovim
Coc Bookmark
Bookmark extension for coc.nvim
Stars: ✭ 66 (-94.49%)
Mutual labels:  neovim
Intero.nvim
Haskell+Neovim lightning fast autocompletion and other IDE functionality
Stars: ✭ 76 (-93.66%)
Mutual labels:  neovim
Wishlist
A public catalogue of Lua plugins Neovim users would like to see exist
Stars: ✭ 74 (-93.82%)
Mutual labels:  neovim

Introduction

NCM2, formerly known as nvim-completion-manager, is a slim, fast and hackable completion framework for neovim.

Main features:

  1. Fast and asynchronous completion support, with vimscript friendly API.
  2. Smart on files with different languages, for example, css/javascript completion in html style/script tag.
  3. Function parameter expansion support using ncm2-snippet plugins.
  4. Language server protocol plugin integration.

Read our wiki page for a list of extensions and programming languages support for NCM2.

peek 2018-07-17 18-15

View demo vimrc at #19

Requirements

  • :echo has("nvim-0.2.2") prints 1. Older versions has not been tested
  • :echo has("python3") prints 1. This is usually set by python3 -m pip install pynvim in shell and let g:python3_host_prog=/path/to/python/executable/ in vimrc.
  • Plugin nvim-yarp

For vim8 user, read the nvim-yarp README. Note that vim8 support is simply a bonus. It's not the goal of NCM2.

Install

    " assuming you're using vim-plug: https://github.com/junegunn/vim-plug
    Plug 'ncm2/ncm2'
    Plug 'roxma/nvim-yarp'

    " enable ncm2 for all buffers
    autocmd BufEnter * call ncm2#enable_for_buffer()

    " IMPORTANT: :help Ncm2PopupOpen for more information
    set completeopt=noinsert,menuone,noselect

    " NOTE: you need to install completion sources to get completions. Check
    " our wiki page for a list of sources: https://github.com/ncm2/ncm2/wiki
    Plug 'ncm2/ncm2-bufword'
    Plug 'ncm2/ncm2-path'

Optional Vimrc Tips

    " suppress the annoying 'match x of y', 'The only match' and 'Pattern not
    " found' messages
    set shortmess+=c

    " CTRL-C doesn't trigger the InsertLeave autocmd . map to <ESC> instead.
    inoremap <c-c> <ESC>

    " When the <Enter> key is pressed while the popup menu is visible, it only
    " hides the menu. Use this mapping to close the menu and also start a new
    " line.
    inoremap <expr> <CR> (pumvisible() ? "\<c-y>\<cr>" : "\<CR>")

    " Use <TAB> to select the popup menu:
    inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
    inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"

    " wrap existing omnifunc
    " Note that omnifunc does not run in background and may probably block the
    " editor. If you don't want to be blocked by omnifunc too often, you could
    " add 180ms delay before the omni wrapper:
    "  'on_complete': ['ncm2#on_complete#delay', 180,
    "               \ 'ncm2#on_complete#omni', 'csscomplete#CompleteCSS'],
    au User Ncm2Plugin call ncm2#register_source({
            \ 'name' : 'css',
            \ 'priority': 9,
            \ 'subscope_enable': 1,
            \ 'scope': ['css','scss'],
            \ 'mark': 'css',
            \ 'word_pattern': '[\w\-]+',
            \ 'complete_pattern': ':\s*',
            \ 'on_complete': ['ncm2#on_complete#omni', 'csscomplete#CompleteCSS'],
            \ })

How Do I write Ncm2 Source?

One important step is to understand how and when completion gets triggered. Read :help ncm2#register_source carefully, or :help ncm2#register_source-example for quick start.

In case you don't know what tool you should use for async support. Here are some options available:

Debugging

Refer to the debugging section of nvim-yarp

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].