♻️ refactor(nvim): use builtin lsp_status for lualine
This commit is contained in:
parent
3ba0c483e9
commit
dfcca88c1e
1 changed files with 2 additions and 10 deletions
|
@ -1,12 +1,3 @@
|
||||||
local lsp = function()
|
|
||||||
local buf_clients = vim.lsp.get_clients({ bufnr = 0 })
|
|
||||||
if #buf_clients == 0 then
|
|
||||||
return ""
|
|
||||||
end
|
|
||||||
|
|
||||||
return " "
|
|
||||||
end
|
|
||||||
|
|
||||||
local formatter = function()
|
local formatter = function()
|
||||||
local formatters = require("conform").list_formatters(0)
|
local formatters = require("conform").list_formatters(0)
|
||||||
if #formatters == 0 then
|
if #formatters == 0 then
|
||||||
|
@ -41,10 +32,11 @@ return {
|
||||||
}
|
}
|
||||||
|
|
||||||
if vim.g.lualine_info_extras == true then
|
if vim.g.lualine_info_extras == true then
|
||||||
table.insert(opts.sections.lualine_x, 2, lsp)
|
table.insert(opts.sections.lualine_x, 2, { "lsp_status" })
|
||||||
table.insert(opts.sections.lualine_x, 2, formatter)
|
table.insert(opts.sections.lualine_x, 2, formatter)
|
||||||
table.insert(opts.sections.lualine_x, 2, linter)
|
table.insert(opts.sections.lualine_x, 2, linter)
|
||||||
end
|
end
|
||||||
|
|
||||||
opts.sections.lualine_y = { "progress" }
|
opts.sections.lualine_y = { "progress" }
|
||||||
opts.sections.lualine_z = {
|
opts.sections.lualine_z = {
|
||||||
{ "location", separator = "" },
|
{ "location", separator = "" },
|
||||||
|
|
Loading…
Add table
Reference in a new issue