nvim: lua: lsp: Drop lsp-status

We use galaxyline for the status line and it already provides
LSP diagnostics info. So drop lsp-status. While the progress
message during the loading in status line is nice, may be will
incorporate it later by picking only the required pieces.

While at it, expose all diagnostics via statusline using galaxyline
components.
This commit is contained in:
Sanchayan Maity 2021-02-02 20:13:07 +05:30
parent 9918959aa2
commit cb6eef2314
3 changed files with 12 additions and 32 deletions

View file

@ -1,5 +1,4 @@
local nvim_lsp = require('lspconfig')
local lsp_status = require('lsp-status')
local lsp_fuzzy = require('lspfuzzy')
local protocol = require('vim.lsp.protocol')
@ -47,7 +46,6 @@ end
local on_attach = function(client, bufnr)
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
lsp_status.on_attach(client, bufnr)
if client.config.flags then
client.config.flags.allow_incremental_sync = true
@ -105,22 +103,7 @@ end
local servers = { 'hls', 'rust_analyzer' }
for _, lsp in ipairs(servers) do
lsp_fuzzy.setup {}
lsp_status.register_progress()
lsp_status.config({
kind_labels = {},
current_function = true,
indicator_separator = ' ',
indicator_errors = '',
indicator_warnings = '',
indicator_info = ' 🛈 ',
indicator_hint = '',
indicator_ok = '',
spinner_frames = { '', '', '', '', '', '', '', '' },
status_symbol = ' 🇻 ',
select_symbol = nil
})
nvim_lsp[lsp].setup {
on_attach = on_attach,
capabilities = lsp_status.capabilities
}
end

View file

@ -1,4 +1,3 @@
local lsp_status = require('lsp-status')
local gl = require('galaxyline')
local gls = gl.section
@ -128,25 +127,24 @@ gls.left[11] = {
}
}
gls.left[12] = {
Space = {
provider = function () return ' ' end
}
}
gls.left[13] = {
DiagnosticWarn = {
provider = 'DiagnosticWarn',
icon = '',
highlight = { colors.blue, colors.bg },
highlight = { colors.yellow, colors.bg },
}
}
gls.left[13] = {
DiagnosticHint = {
provider = 'DiagnosticHint',
icon = '',
highlight = {colors.orange,colors.bg},
}
}
gls.left[14] = {
LspStatus = {
provider = function()
if #vim.lsp.buf_get_clients() > 0 then
return lsp_status.status()
end
end,
highlight = { colors.orange, colors.bg,'bold' },
DiagnosticInfo = {
provider = 'DiagnosticInfo',
icon = '',
highlight = {colors.cyan,colors.bg},
}
}

View file

@ -117,7 +117,6 @@ local init = function ()
use {
'neovim/nvim-lspconfig',
'ojroques/nvim-lspfuzzy',
'nvim-lua/lsp-status.nvim'
}
-- Language support & syntax highlighting
-- Haskell