tjdevries / express_line.nvim

WIP: Statusline written in pure lua. Supports co-routines, functions and jobs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

lsp_status not showing data if lsp-status package is not loaded from outside

ellisonleao opened this issue · comments

Current lsp-status plugin doesn't entire works if you don't have the package loaded, which it kinda makes sense but i just want to confirm if this is a bug or not. I can reproduce the error like:

P.S: I am using packer.nvim as the plugin manager

Using this code, i see no outputs in the lsp status

local lsp_statusline = require("el.plugins.lsp_status")

require("nvim-web-devicons").setup()

local generator = function()
  return {
    lsp_statusline.segment,
    lsp_statusline.current_function,
    lsp_statusline.server_progress,
  }
end
require("el").setup({generator = generator})

Right now the fix i have for it is to packadd the plugin in order to load the dependency first

vim.cmd [[  packadd lsp-status.nvim ]]
local lsp_statusline = require("el.plugins.lsp_status")

require("nvim-web-devicons").setup()

local generator = function()
  return {
    lsp_statusline.segment,
    lsp_statusline.current_function,
    lsp_statusline.server_progress,
  }
end
require("el").setup({generator = generator})

Let me know if i am missing something here. My current lua config is here

Refer to the capabilities section in nvim_lspconfig. I guess you did not register the capabilities so that info from lsp could be shown.

already fixed, we can close this