Add LSP status to feline
This commit is contained in:
parent
6881b5dfb9
commit
11de3e525f
|
@ -366,7 +366,7 @@ local c = {
|
|||
},
|
||||
lsp_status = {
|
||||
provider = function()
|
||||
return vim.tbl_count(vim.lsp.buf_get_clients(0)) == 0 and "" or " ◦ "
|
||||
return require("lsp-status").status()
|
||||
end,
|
||||
hl = "UserSLStatus",
|
||||
left_sep = { str = "", hl = "UserSLStatusBg", always_visible = true },
|
||||
|
@ -409,10 +409,6 @@ local c = {
|
|||
provider = "position",
|
||||
hl = "StatusLine",
|
||||
},
|
||||
file_winbar = {
|
||||
provider = file_info,
|
||||
hl = "Comment",
|
||||
},
|
||||
}
|
||||
|
||||
local active = {
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
require('fidget').setup{
|
||||
text = {
|
||||
spinner = "dots",
|
||||
},
|
||||
window = {
|
||||
blend = 0,
|
||||
},
|
||||
}
|
|
@ -1,3 +1,6 @@
|
|||
local lsp_status = require('lsp-status')
|
||||
lsp_status.register_progress()
|
||||
|
||||
-- Set up null_ls first
|
||||
local null_ls = require("null-ls")
|
||||
null_ls.setup {
|
||||
|
@ -41,6 +44,7 @@ end
|
|||
-- Use an on_attach function to only map the following keys
|
||||
-- after the language server attaches to the current buffer
|
||||
local on_attach = function(client, bufnr)
|
||||
lsp_status.on_attach(client)
|
||||
-- Mappings.
|
||||
-- See `:help vim.lsp.*` for documentation on any of the below functions
|
||||
local bufopts = { noremap = true, silent = true, buffer = bufnr }
|
||||
|
@ -68,7 +72,7 @@ local lsp_flags = {
|
|||
debounce_text_changes = 150,
|
||||
}
|
||||
|
||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
local capabilities = vim.tbl_extend('keep', require('cmp_nvim_lsp').default_capabilities(), lsp_status.capabilities)
|
||||
|
||||
require('lspconfig')['pyright'].setup{
|
||||
on_attach = on_attach,
|
||||
|
|
|
@ -44,6 +44,7 @@ require('packer').startup {
|
|||
use 'nvim-lua/plenary.nvim'
|
||||
use {
|
||||
'neovim/nvim-lspconfig',
|
||||
'https://github.com/nvim-lua/lsp-status.nvim.git',
|
||||
'hrsh7th/nvim-cmp',
|
||||
'hrsh7th/cmp-nvim-lsp',
|
||||
'hrsh7th/cmp-buffer',
|
||||
|
@ -77,9 +78,6 @@ require('packer').startup {
|
|||
}
|
||||
use {
|
||||
'j-hui/fidget.nvim',
|
||||
config = function()
|
||||
require 'config.fidget'
|
||||
end
|
||||
}
|
||||
use {
|
||||
'stevearc/aerial.nvim',
|
||||
|
|
Loading…
Reference in a new issue