on main help sign in
fix: lsp sort
commitf002e6f855752dfa7fc197edbfaa84213771e675 authorKujtim Hoxha <kujtimii.h@gmail.com> dateThu 22 Jan 2026, 12:11 (9 months ago) parent4e66b9c
2 files changed+10−1
internal/ui/model/lsp.go+8−1 internal/ui/model/ui.go+2
internal/ui/model/lsp.go+8−1
@@ -23,8 +23,14 @@ type LSPInfo struct {
2323func (m *UI) lspInfo(width, maxItems int, isSection bool) string {
2424 var lsps []LSPInfo
2525 t := m.com.Styles
26+ lspConfigs := m.com.Config().LSP.Sorted()
27+
28+ for _, cfg := range lspConfigs {
29+ state, ok := m.lspStates[cfg.Name]
30+ if !ok {
31+ continue
32+ }
2633
27− for _, state := range m.lspStates {
2834 client, ok := m.com.App.LSPClients.Get(state.Name)
2935 if !ok {
3036 continue
@@ -39,6 +45,7 @@ func (m *UI) lspInfo(width, maxItems int, isSection bool) string {
3945
4046 lsps = append(lsps, LSPInfo{LSPClientInfo: state, Diagnostics: lspErrs})
4147 }
48+
4249 title := t.Subtle.Render("LSPs")
4350 if isSection {
4451 title = common.Section(t, title, width)
internal/ui/model/ui.go+2
@@ -265,6 +265,8 @@ func New(com *common.Common) *UI {
265265 completions: comp,
266266 attachments: attachments,
267267 todoSpinner: todoSpinner,
268+ lspStates: make(map[string]app.LSPClientInfo),
269+ mcpStates: make(map[string]mcp.ClientInfo),
268270 }
269271
270272 status := NewStatus(com, ui)