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.

There maybe some thing wrong about popup menu?

See original GitHub issue
Plug 'ncm2/ncm2'
Plug 'ncm2/ncm2-highprio-pop'
Plug 'roxma/nvim-yarp'

Plug 'ncm2/ncm2'
Plug 'roxma/nvim-yarp'

Plug 'ncm2/ncm2-bufword'
Plug 'ncm2/ncm2-tmux'
Plug 'ncm2/ncm2-path'
Plug 'fgrsnau/ncm2-otherbuf', { 'branch': 'ncm2'}
Plug 'ncm2/ncm2-ultisnips'

" languages
Plug 'ncm2/ncm2-tern',  {'do': 'npm install','for':['javascript','javascript.jsx']}
" Plug 'ncm2/ncm2-pyclang',  {'for':['c','cpp']}
Plug 'ncm2/ncm2-cssomni',{'for':'css'}
Plug 'ncm2/ncm2-jedi',{'for':'python'}

let $NVIM_PYTHON_LOG_FILE="/tmp/nvim_log"
let $NVIM_PYTHON_LOG_LEVEL="DEBUG"
let g:python_host_skip_check=1
let g:python_host_prog = '/usr/bin/python2'
let g:python3_host_skip_check=1
let g:python3_host_prog = '/usr/bin/python3'

let g:ncm2#auto_popup=1
set completeopt=noselect,menuone,noinsert
autocmd InsertEnter * call ncm2#enable_for_buffer()
" au TextChangedI * call ncm2#auto_trigger()


function! SmartEnterMap()
  if ncm2_ultisnips#completed_is_snippet()
    return  ncm2_ultisnips#_do_expand_completed()
  else
    return "\<C-y>"
  endif
endfunction
inoremap <expr> <CR> pumvisible() ? "<C-R>=SmartEnterMap()<CR>" : "\<CR>"


function! Multiple_cursors_before()
    call ncm2#lock('vim-multiple-cursors')
endfunction

function! Multiple_cursors_after()
    call ncm2#unlock('vim-multiple-cursors')
endfunction

" common
call ncm2#override_source('ultisnips', {'priority': 10})
" language
let g:ncm2_pyclang#library_path = '/usr/lib/libclang.so'
let g:ncm2_pyclang#args_file_path = ['.clang_complete']
let g:ncm2_pyclang#database_path = [
            \ 'compile_commands.json',
            \ 'build/compile_commands.json'
            \ ]
" lsp
call ncm2#override_source('LanguageClient_python', {'enable': 0})
" call ncm2#override_source('LanguageClient_cpp', {'enable': 0})
call ncm2#override_source('LanguageClient_javascript', {'enable': 0})
call ncm2#override_source('LanguageClient_typescript', {'enable': 0})
call ncm2#override_source('LanguageClient_javascript.jsx', {'enable': 0})

Plug 'autozimu/LanguageClient-neovim', {
  \ 'branch': 'next',
  \ 'do': 'bash install.sh',
  \ 'frozen': 1,
  \ 'on_event': ['CursorHold', 'CursorHoldI', 'InsertEnter']
  \ }




let g:LanguageClient_serverCommands = {
    \ 'python':['pyls'],
    \ 'c': ['ccls', '--log-file=/tmp/cc.log'],
    \ 'cpp': ['ccls', '--log-file=/tmp/cc.log'],
    \ 'javascript': ['javascript-typescript-stdio'],
    \ 'javascript.jsx': ['javascript-typescript-stdio'],
    \ 'typescript': ['javascript-typescript-stdio'],
    \ 'css' : ['css-languageserver','--stdio'],
    \ 'less' : ['css-languageserver','--stdio'],
    \ 'sass' : ['css-languageserver','--stdio'],
    \ }
let g:LanguageClient_autoStart = 1
let g:LanguageClient_loadSettings = 1
let g:LanguageClient_settingsPath = '$HOME/.space-vim/layers/+tools/lspc/settings.json'
set completefunc=LanguageClient#complete
set formatexpr=LanguageClient#textDocument_rangeFormatting_sync()
let g:LanguageClient_completionPreferTextEdit=1
let g:LanguageClient_hasSnippetSupport =0
let g:LanguageClient_loggingLevel = 'INFO'
let g:LanguageClient_loggingFile = stdpath('data') . '/LanguageClient.log'
let g:LanguageClient_serverStderr = stdpath('data') . '/LanguageServer.log'
" disable interact with ale
let g:LanguageClient_diagnosticsEnable=0

nnoremap <silent> K :call LanguageClient#textDocument_hover()<CR>
nnoremap <silent> gd :call LanguageClient#textDocument_definition()<CR>
nnoremap <silent> gvd :call LanguageClient#textDocument_definition({'gotoCmd': 'split'})<CR>
nnoremap <silent> <localleader>cn :call LanguageClient#textDocument_rename()<CR>
nnoremap <silent> <leader><leader>z :pc<CR>
nnoremap <silent> <M-c> :pc<CR>

augroup LanguageClient_config
  autocmd!
  autocmd silent! User LanguageClientStarted setlocal signcolumn=yes
  autocmd silent! User LanguageClientStopped setlocal signcolumn=auto
augroup END

Here’s my vimrc about ncm2 and lsp.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
hackingcatcommented, Dec 14, 2018

Before I updated ncm2 to the latest commit,the popup menu will display ‘if us’ and ‘if keyword’ after typing ‘if’,but now only ‘if us’ was displayed.

ncm2-bug

@roxma

0reactions
hackingcatcommented, Dec 14, 2018

After removing ‘ncm2/ncm2-highprio-pop’,ncm2 works well as expected.Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

popup menu won't show - Godot Engine - Q&A
Maybe you get the wrong popup menu, or maybe your menu is somewhere else far away from your screen, there can be many...
Read more >
Popup menu right click behavior #439 - ocornut/imgui - GitHub
Hi I try to open a context menu, the first time I "right click" it open, so it is ok. The next time...
Read more >
Pop-up menu incorrectly shows first field - Claris Community
In FileMaker 16 & 17, when you add a new field to the layout and then set it as a "Pop-up Menu", and...
Read more >
Popup Menu issue in Android ListView - Stack Overflow
The best solution of this I think is to use PopupWindow ,you can control every thing of it and it is ...
Read more >
Inconsistent behaviour of popup menus with submenus attached
I've been experimenting with menu structures (i.e. a tree of menus and submenus) installed either on the menu bar or as context menus, ......
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