How to make mini.completion work with nvim runtime completions #248
-
Right now when doing If I were to explicitly do Here's my lua-language-server settings (using neovim/nvim-lspconfig): require('lspconfig').lua_ls.setup({
settings = {
Lua = {
runtime = {
version = 'LuaJIT',
},
diagnostics = {
globals = { 'vim' },
},
workspace = {
library = vim.api.nvim_get_runtime_file('', true),
checkThirdParty = false,
},
telemetry = {
enable = false,
},
},
},
}) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
First of all, thanks for Second, I am not sure what to tell you. I've just reproduced
|
Beta Was this translation helpful? Give feedback.
-
Through bisect I've narrowed it down to this bit of code being uncommented in my init.lua, which causes the issue: local MyAugroup = vim.api.nvim_create_augroup('MyAugroup', {})
vim.api.nvim_create_autocmd('BufEnter', {
group = MyAugroup,
command = 'if &bt ==# "terminal" | norm! a | endif',
desc = 'Automatically enter terminal-mode when entering a terminal buffer'
}) @echasnovski I'm not sure how this is not compatible with the mini.completion BufEnter event settings. Do you see how setting this autocmd would mess it up? Is there a hidden terminal running or something, or maybe it's a load order thing with this autocmd? |
Beta Was this translation helpful? Give feedback.
First of all, thanks for
library = vim.api.nvim_get_runtime_file('', true),
line. I didn't update my Lua Lsp setup in a while, mostly because it works and I tend to read Neovim help docs anyway. But replacing my previousworkspace.library
with this one made it better. Maybe even a bit too much, as it suggests from plugin codebases, so we'll see.Second, I am not sure what to tell you. I've just reproduced
vim.api.nvim
autocompletion with your 'lua_ls' setup and plainrequire('mini.completion').setup()
. Let's try to be on the same page:<Ctrl> + <Space>
(default mapping for triggering two-stage completion)?:echo &completefunc
and:…