@@ -2,6 +2,8 @@ package model
7 "charm.land/lipgloss/v2"
9 "charm.land/lipgloss/v2"
@@ -21,16 +23,14 @@ type LSPInfo struct {
21// lspInfo renders the LSP status section showing active LSP clients and their
23// lspInfo renders the LSP status section showing active LSP clients and their
22// diagnostic counts.
24// diagnostic counts.
23func (m *UI) lspInfo(width, maxItems int, isSection bool) string {
25func (m *UI) lspInfo(width, maxItems int, isSection bool) string {
25 t := m.com.Styles
26 t := m.com.Styles
26− lspConfigs := m.com.Config().LSP.Sorted()
28− for _, cfg := range lspConfigs {
28+ states := slices.SortedFunc(maps.Values(m.lspStates), func(a, b app.LSPClientInfo) int {
29− state, ok := m.lspStates[cfg.Name]
29+ return strings.Compare(a.Name, b.Name)
33+ for _, state := range states {
34 client, ok := m.com.App.LSPClients.Get(state.Name)
34 client, ok := m.com.App.LSPClients.Get(state.Name)