bluz71 / nvim-linefly

A simple Lua statusline for Neovim
MIT License
79 stars 2 forks source link

attempt to call field 'get_clients' (a nil value) #14

Closed 112RG closed 1 month ago

112RG commented 1 month ago

Hi I love using this stats line plugin but after updating the plugin and Neovim I see to be getting the error below

E5108: Error executing lua .../.local/share/nvim/lazy/nvim-linefly/lua/linefly/lsp.lua:12: attempt to call field 'get_clients' (a nil value)
stack traceback:
        .../.local/share/nvim/lazy/nvim-linefly/lua/linefly/lsp.lua:12: in function 'attached_clients'
        ....local/share/nvim/lazy/nvim-linefly/lua/linefly/init.lua:86: in function <....local/share/nvim/lazy/nvim-linefly/lua/linefly/init.lua:57

I am running nvim

NVIM v0.10.0-dev-586+g8ea9a70d0-Homebrew
Build type: Release
LuaJIT 2.1.1716656478

With the latest linefly version I have laststatus set to 2.

I can see from the code get_clients is a NVIM 0.10+ function I am wondering why its returning nil and erroring?

bluz71 commented 1 month ago

You are running an old development version of Neovim (v0.10.0-dev-586+g8ea9a70d0) that dates from June 27 2023 (nearly a year old, and likely unstable).

Please upgrade to the latest stable version of Neovim 0.10 via:

brew uninstall neovim # this should remove your old development version of Neovim
brew install neovim # this will install the latest stable version of Neovim 0.10

Generally speaking, plugins such as linefly are only designed to run against the stable version of Neovim.

I strongly suspect your issue will go away after the Neovim upgrade.

Best regards.