I have <C-x><C-o> working just fine with neovim with my old vim configuration but when I switch over to my new config, I'm not having any luck and I can't figure out why.

When I hit <C-x><C-o> I get an error:

E119: Not enough arguments for function: 1

After a couple of seconds, vim then says:

-- Omni completion (^O^N^P) Pattern not found

My ftplugin/ruby.com file looks like this:

setlocal tabstop=2      "Tab indentation levels every four columns
setlocal shiftwidth=2   "Indent/outdent by four columns
setlocal expandtab      "Convert all tabs that are typed into spaces
setlocal shiftround     "Always indent/outdent to nearest tabstop
setlocal smarttab       "Use shiftwidths at left margin, tabstops everywhere else
"let g:ruby_host_prog = '~/.rbenv/versions/2.7.1/bin/neovim-ruby-host'
let g:loaded_ruby_provider = 1
packadd ale
"let g:ale_enabled = 0
nnoremap <F6> :execute "ALEFix"<cr>
"packadd syntastic
packadd vim-ruby
compiler ruby
set completeopt+=longest
let g:rubycomplete_buffer_loading = 1
let g:rubycomplete_classes_in_global = 1
let g:rubycomplete_rails = 1
set omnifunc=syntaxcomplete#Complete
let g:ale_fixers = { 'ruby': ['rubocop'] }
let g:ale_sign_error = '🚫'
let g:ale_sign_warning = '✋'
let g:airline#extensions#ale#enabled = 1
let g:ale_open_list = 1
let g:ale_set_loclist = 1
let g:ale_lint_on_save = 1
let g:ale_lint_on_text_changed = 0
let g:ale_completion_enabled = 1
let g:ale_sign_column_always = 1
  • What file/filetype are you editing? Have you checked that in fact omnifunc is set right in that file? Does the E119 have a location associated with it? – D. Ben Knoble Jun 11 '20 at 11:47
  • I opened a new file and moved the omnifunc statement further down in the file. Works now. – StevieD Jun 12 '20 at 13:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.