From b8317e96197818955c5091c4b7088ee99c3aa9d7 Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Thu, 22 Jan 2026 10:09:27 -0300 Subject: [PATCH] fix(ui): sort lsps Signed-off-by: Carlos Alexandro Becker --- internal/ui/model/lsp.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/ui/model/lsp.go b/internal/ui/model/lsp.go index 61e9f75d478ef51daee465ca7eeca109acd6c64b..5b0db8e91e21ccaffc517c234b2192451fa76a95 100644 --- a/internal/ui/model/lsp.go +++ b/internal/ui/model/lsp.go @@ -2,6 +2,7 @@ package model import ( "fmt" + "slices" "strings" "charm.land/lipgloss/v2" @@ -39,6 +40,11 @@ func (m *UI) lspInfo(width, maxItems int, isSection bool) string { lsps = append(lsps, LSPInfo{LSPClientInfo: state, Diagnostics: lspErrs}) } + + slices.SortFunc(lsps, func(a, b LSPInfo) int { + return strings.Compare(a.Name, b.Name) + }) + title := t.Subtle.Render("LSPs") if isSection { title = common.Section(t, title, width)