gaalcaras / ncm-R

R autocompletion for Neovim and vim 8 :memo: :bar_chart: :zap:
GNU General Public License v3.0
115 stars 10 forks source link

ncm completion not showing #31

Open xllvrr opened 4 years ago

xllvrr commented 4 years ago

Recently, the omnicompletion has not been showing Configuration file is as below, using ArchLinux on the latest kernel right now. Not sure whether it's a problem with the settings or with another plugin. Tried to uninstall some of the plugins I thought might have an issue and reinstalled the ncm2 stuff but doesn't seem to make a diff


call plug#begin('~/repos/plugged')

" ncm2 for Autocomplete
Plug 'ncm2/ncm2' " Snippets for ncm-R
Plug 'roxma/nvim-yarp' " Dependency for ncm2
Plug 'ncm2/ncm2-bufword'
Plug 'ncm2/ncm2-path'
Plug 'sirver/ultiSnips'
Plug 'ncm2/ncm2-ultisnips'
" For R
Plug 'gaalcaras/ncm-R' " Code Completion for R
augroup ncm2
    autocmd BufEnter * call ncm2#enable_for_buffer()
    set completeopt=noinsert,menuone,noselect
    inoremap <c-c> <ESC>
augroup END

Currently, only packages show image

marskar commented 4 years ago

@xllvrr, I am experiencing the same. You can take a look at #9 for more info, but I think the best suggestion will be to give r-lsp a try. I switched am using a coc plugin called coc-r-lsp in vimr (no relation to Nvim-R). I am using vimr so I can send code with command enter (like in RStudio on MacOS). I installed coc via vim-plug and the languageserver R package install.packages("languageserver"), then ran :CocInstall coc-r-lsp, and everything is working OK so far.

andyquinterom commented 3 years ago

Having the same issue in macOs

Freguglia commented 3 years ago

I'm having the same issue. Objects in .GlobalEnv appear in the completion box normally, but functions (e.g., read.csv) do not. When you trigger omni completion manually with <C-X><C-O> functions appears as expected.

Completion for object in .GlobalEnv globalenv

Completion for ggplot function failing after loading ggplot2 ncmfail

Triggering Omni completion with <C-X><C-O> in the above scenario omniworks