Skip to content

I followed the example setup word by word and even deleted airline but this plugin doesnt seem to update &statusline variable #75

@ta3pks

Description

@ta3pks
local lsp_status = require "lsp-status"
lsp_status.register_progress()
local capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities())
capabilities = vim.tbl_extend('keep', capabilities or {}, lsp_status.capabilities)
require("nvim-lsp-installer").on_server_ready(function(server)
  local status_handler = lsp_status.extensions[server.name] or {setup = function() end}
  local cfg = {
    handlers = status_handler.setup(),
    capabilities = capabilities,
    on_attach = on_attach,
    flags = {
      -- This will be the default in neovim 0.7+
      debounce_text_changes = 150,
    },
  }
  if server.name == "rust_analyzer"  then
    cfg.settings ={ ['rust-analyzer'] = ra_config }
  elseif server.name == "denols" then
    cfg.init_options = {
    lint = true,
  }
  end
  server:setup(cfg)
end)
vim.cmd [[
function! LspStatus() abort
  if luaeval('#vim.lsp.buf_get_clients() > 0')
    return luaeval("require('lsp-status').status()")
  endif

  return ''
endfunction
]]

now if I update statusline manually doing let &statusline = LspStatus() all fine but the plugin doesnt to anything on its own which also defeats the purpose of having a statusline plugin
Am I missing something. I followed everything that the readme suggested

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions