Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Setup require("neoconf").setup() should be run **BEFORE** BUG #58

Open
3 tasks done
leoatchina opened this issue Jun 2, 2024 · 1 comment
Open
3 tasks done
Labels
bug Something isn't working

Comments

@leoatchina
Copy link

leoatchina commented Jun 2, 2024

Did you check docs and existing issues?

  • I have read all the neoconf.nvim docs
  • I have searched the existing issues of neoconf.nvim
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

0.10 (nvim-qt and neovide)

Operating system/version

WIndow10/11

Describe the bug

My (neo)vim's config is set up aiming to compatible for both neovim and vim in LINUX/MACOS/WINDOWS, so I have to use vim-plug to setting up my config , and :luafile is occupied to load pure lua plugins.
I have run into such a strange bug with neovim with gui, in other words nvim-qt and neovide.
In my config neoconf is definitely set up before mason-lspconfig.In other OS or neovim without gui in windows, the waring
NOT raised up when I start neovim , I only appear in windows when I use neovide or nvim-qt.
https://github.com/leoatchina/leovim/blob/master/conf.d/element/lua/lsp.lua

I think it must be the lsputil check bug.

local lsputil = package.loaded["lspconfig.util"]
if lsputil then
if #lsputil.available_servers() == 0 then
return true
else
util.error(
[[Setup `require("neoconf").setup()` should be run **BEFORE** setting up any lsp server with lspconfig]]

Steps To Reproduce

WINDOWS-> vim-plug-> neovide or nvim-qt

Expected Behavior

No, warning

Repro

https://github.com/leoatchina/leovim/blob/master/conf.d/element/lua/lsp.lua

@leoatchina leoatchina added the bug Something isn't working label Jun 2, 2024
@jgoguen
Copy link

jgoguen commented Jun 8, 2024

I'm seeing this on Fedora 39, CLI nvim, using lazy.nvim as the config base. The only customization I'm doing around neoconf is setting import.vscode = false:

-- ~/.config/nvim/lua/plugins/neoconf.lua
 local M = {
    'folke/neoconf.nvim',
    opts = {
        import = {
            vscode = false,
        },
    },
}

return M

And I'm loading plugin configs using lazy's spec parameter:

-- ~/.config/nvim/lua/config/lazy.lua

require('lazy').setup({
    spec = {
        { 'LazyVim/LazyVim', import = 'lazyvim.plugins' },
        { import = 'plugins' },
    },
})

My full neovim config, if needed, is at https://github.com/jgoguen/dotfiles/tree/main/dot_config/exact_nvim/exact_lua (managed by chezmoi, the exact_ prefix on a directory name tells chezmoi to remove any files it doesn't know about in that directory).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants