NamPNQ / lsp_status

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

lsp_status

Retreive the status of nvim's builtin LSP clients.

install

paq 'doums/lsp_status'

setup

local lspconfig = require'lspconfig'
local lsp_status = require'lsp_status'

-- register an handler for `$/progress` method
lsp_status.setup()

local function on_attach(client)
  -- ... other stuff

  -- get client name
  lsp_status.on_attach(client)
end

lspconfig.rust_analyzer.setup {  -- Rust Analyzer setup
  on_attach = on_attach,
  -- add `window/workDoneProgress` to default client capabilities
  capabilities = lsp_status.capabilities
}

get status

The status is either the LSP client name or, if it exists, a text built from the last "Work done progress" notification.

See the spec for details.

require'lsp_status'.status()

Listen to the autocommand event LspStatusChanged to get notified when the status is updated.

license

Mozilla Public License 2.0

About


Languages

Language:Lua 100.0%