nvim-lua / completion-nvim

A async completion framework aims to provide completion to neovim's built in LSP written in Lua
Apache License 2.0
973 stars 78 forks source link

Doesn't load with init.lua #392

Closed Rmmichael95 closed 3 years ago

Rmmichael95 commented 3 years ago

My testing minimal init.vim Post your init.vim to help me reproduce this issue

local o = vim.o -- global options local cmd = vim.cmd local map = vim.api.nvim_set_keymap

require "paq" { "savq/paq-nvim"; -- Let Paq manage itself

"neovim/nvim-lsp";          -- Mind the semi-colons
"nvim-lua/completion-nvim";

}

lua require'nvim_lsp'.sumneko_lua.setup{on_attach=require'completion'.on_attach}

cmd('au Filetype lua setl omnifunc=v:lua.vim.lsp.omnifunc')

-- Use and to navigate through popup menu options = { noremap = true } map('i', ' ', 'pumvisible() ? "\" : "\"', options) map('i', ' ', 'pumvisible() ? "\" : "\"', options)

" Set completeopt to have a better completion experience o.completeopt = 'menuone,noinsert,noselect'

How to reproduce Detailed step to reproduce this issue.

Attempting to use require'completion'.on_attach when loading neovim from init.lua always throws attempt to index boolean value. Completion-nvim works as expected when loading from init.vim with lua surrounding. Still does not work calling form completion.vim when loading neovim with init.lua

Expected behavior A clear and concise description of what you expected to happen.

loads completion-nvim if starting nvim from init.lua

checking scriptnames, everything seems to be loading the same with init.vim and init.lua so I don't think the problem is paq