question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Auto popup not working with LanguageClient-neovim

See original GitHub issue

Using ncm2 I can’t find a way to show completions from LSP without having to hit CTRL_X CTRL_O

OS

minimal vimrc:

    set nocompatible            " Must be first line
    filetype plugin indent on   " Automatically detect file types.
    syntax on                   " Syntax highlighting
    set autoread                " Autoread file if it was changed on disk
    set mouse=a                 " Automatically enable mouse usage
    set mousehide               " Hide the mouse cursor while typing
    scriptencoding utf-8
    set encoding=utf8
    if has('clipboard')
        if has('unnamedplus')  " When possible use + register for copy-paste
            set clipboard=unnamed,unnamedplus
        else         " On mac and Windows, use * register for copy-paste
            set clipboard=unnamed
        endif
    endif
    set autowrite                       " Automatically write a file when leaving a modified buffer
    set shortmess+=filmnrxcoOtT         " Abbrev. of messages (avoids 'hit enter')
    set viewoptions=folds,options,cursor,unix,slash " Better Unix / Windows compatibility
    set virtualedit=onemore             " Allow for cursor beyond last character
    set history=250                     " Store a ton of history (default is 20)
    set hidden                          " Allow buffer switching without saving
    set lazyredraw                      " Don't redraw on macros
    set iskeyword -=.                    " '.' is an end of word designator
    set iskeyword -=#                    " '#' is an end of word designator
    set iskeyword -=-                    " '-' is an end of word designator

    " Set completeopt to menuone only to disable the preview =_=
    "set completeopt=noinsert,menuone,preview,noselect
    au User Ncm2PopupOpen set completeopt=noinsert,menuone,noselect
    au User Ncm2PopupClose set completeopt=menuone


      call plug#begin('~/.vim/plugged')
      Plug 'autozimu/LanguageClient-neovim', { 'branch': 'next', 'do': 'bash install.sh' }
      Plug 'ncm2/ncm2'
      Plug 'roxma/nvim-yarp'
      call plug#end()

      let g:LanguageClient_serverCommands = {
            \ 'python': ['pyls'],
            \ 'rust': ['rls'],
            \ }

      autocmd BufEnter * call ncm2#enable_for_buffer()
      imap <expr> <CR>  (pumvisible() ?  "\<c-y>\<Plug>(expand_or_nl)" : "\<CR>")
      imap <expr> <Plug>(expand_or_nl) (cm#completed_is_snippet() ? "\<C-j>":"\<CR>")
      inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
      inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"

neovim :version output

NVIM v0.3.1
Build type: Release
LuaJIT 2.0.5
Compilation: /usr/bin/cc -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -Wconversion -O2 -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fdiagnostics-color=auto -Wno-array-bounds
-DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/build/neovim/src/build/config -I/build/neovim/src/neovim-0.3.1/src -I/usr/include -I/build/neovim/src/build/src/nvim/auto -I/build/neovim/src/build/include
Compiled by builduser

Features: +acl +iconv +jemalloc +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

neovim :messages output when the error occurs

N/A

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
roxmacommented, Aug 10, 2018
0reactions
roxmacommented, Sep 1, 2018

@jmdaly

This issue has been fixed

Please open new issue with detailed information.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ESLint autofix is not working with coc.nvim - Stack Overflow
When running eslint --fix locally the files get formatted with no problem. However when saving a file within neovim with autocmd BufWritePre ...
Read more >
Shougo/deoplete.nvim - Gitter
I'm currently having problems with deople. When I open nvim and I enter the insert mode a lot of errors start displaying. This...
Read more >
Neovim (0.5) Is Overpowering - CrispDev
lua , but it looks not so native. e.g.: Calling to vim command is literally command string; Config options is not that easy;...
Read more >
Automatic auto-completion menu popup (not using tab) - Reddit
Hello! I am trying to learn and use neovim, particularly with LSP for rust development :) I'm still too used to vscode to...
Read more >
Language Server Protocol (LSP) support for vim and neovim.
It seems that LanguageClient-neovim does not work well with neosnippet for function ... The completion menu does not popup automatically in any Language....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found