refactor(nvim): use own lsp_attached
func for heirline
All checks were successful
Check Formatting of Files / Check-Formatting (push) Successful in 1m15s
All checks were successful
Check Formatting of Files / Check-Formatting (push) Successful in 1m15s
Avoids a current deprecation notice while I'm waiting on https://github.com/rebelot/heirline.nvim/pull/193 to be reviewed
This commit is contained in:
parent
5622acc6d5
commit
c5453da0b4
@ -15,6 +15,9 @@ return {
|
||||
|
||||
local utils = require("heirline.utils")
|
||||
local conditions = require("heirline.conditions")
|
||||
local lsp_attached = function()
|
||||
return next(vim.lsp.get_clients({ bufnr = vim.api.nvim_get_current_buf() })) ~= nil
|
||||
end
|
||||
|
||||
local pad = function(num)
|
||||
return string.rep(" ", num)
|
||||
@ -550,7 +553,7 @@ return {
|
||||
{
|
||||
{
|
||||
condition = function()
|
||||
return conditions.lsp_attached() or conditions.has_diagnostics()
|
||||
return lsp_attached() or conditions.has_diagnostics()
|
||||
end,
|
||||
{
|
||||
provider = seps.full.left,
|
||||
@ -573,7 +576,7 @@ return {
|
||||
provider = seps.full.right,
|
||||
hl = function()
|
||||
local bg = colors.oniViolet2
|
||||
if conditions.has_diagnostics() and not conditions.lsp_attached() then
|
||||
if conditions.has_diagnostics() and not lsp_attached() then
|
||||
bg = colors.sumiInk2
|
||||
end
|
||||
|
||||
@ -582,7 +585,7 @@ return {
|
||||
},
|
||||
},
|
||||
{
|
||||
condition = conditions.lsp_attached,
|
||||
condition = lsp_attached,
|
||||
{
|
||||
update = { "LspAttach", "LspDetach" },
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user