I’m able to get autocomplete working in scripts if I use the following configuration.
nvim -u MINRC test.jl
set nocompatible
filetype off
if empty(glob('~/.local/share/nvim/site/autoload/plug.vim'))
silent !curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
call plug#begin('~/.local/share/nvim/plugged')
Plug 'JuliaEditorSupport/julia-vim'
Plug '~/gitrepos/nvim-lsp'
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
" Plug 'Shougo/deoplete-lsp'
let g:deoplete#enable_at_startup = 1
call plug#end()
lua << EOF
require'nvim_lsp'.julials.setup{}
EOF
autocmd Filetype julia setlocal omnifunc=v:lua.vim.lsp.omnifunc
nnoremap <silent> <c-]> <cmd>lua vim.lsp.buf.definition()<CR>
nnoremap <silent> K <cmd>lua vim.lsp.buf.hover()<CR>
nnoremap <silent> gr <cmd>lua vim.lsp.buf.references()<CR>
nnoremap <silent> g0 <cmd>lua vim.lsp.buf.document_symbol()<CR>
But with nvim -u MINRC src/Package.jl
it doesn’t seem to autocomplete correctly.
I’m still looking into it but thought I’d post this to see if someone else has the same effect.