Skip to content

feat(lsp): group language servers into built-in, plugin, and custom categories#2452

Merged
bajrangCoder merged 2 commits into
mainfrom
feat/lsp-settings-categories
Jul 5, 2026
Merged

feat(lsp): group language servers into built-in, plugin, and custom categories#2452
bajrangCoder merged 2 commits into
mainfrom
feat/lsp-settings-categories

Conversation

@bajrangCoder

@bajrangCoder bajrangCoder commented Jul 5, 2026

Copy link
Copy Markdown
Member

To avoid confusion like #2439

@github-actions github-actions Bot added enhancement New feature or request translations Anything related to Translations Whether a Issue or PR labels Jul 5, 2026
@greptile-apps

greptile-apps Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR splits the flat "Servers" list in the LSP settings page into three labeled groups — Built-in, Plugin, and Custom — by classifying each registered server against the static builtinServers array and the isCustomServer flag from user settings. New i18n keys are added to all 32 locale files to label the two new categories.

  • lspSettings.js now builds three separate lists (builtinServersList, pluginServersList, customServersList) before assembling the final items array, replacing the old single-pass push loop.
  • Two new translation keys (settings-category-builtin-servers, settings-category-plugin-servers) are added to every locale file and the LangStrings type, but all non-English files use the English fallback text rather than locale-specific translations.
  • The old settings-category-servers key is removed from the JS code but left in all 32 language JSON files and in index.d.ts, leaving orphaned translation entries.

Confidence Score: 4/5

The categorization logic is sound and the UI change is contained to the LSP settings page; the only leftover is an orphaned translation key and untranslated new strings across non-English locales.

The core classification logic correctly separates built-in, plugin, and custom servers. The old settings-category-servers key was removed from the JS but left behind in all 32 language files and index.d.ts, producing dead translation entries. The two new category labels are in English across every non-English locale, so users of those locales will see untranslated headings. Neither issue breaks functionality, but both are worth cleaning up before merging.

All 32 src/lang/*.json files and src/lang/index.d.ts — they still carry the now-unused settings-category-servers key, and the new keys lack locale-specific translations.

Important Files Changed

Filename Overview
src/settings/lspSettings.js Refactors server list rendering to bucket servers into built-in, plugin, and custom categories using builtinServers.some() ID lookup and isCustomServer(); old index: 0 hint on the "add custom server" item is removed. Logic appears correct for the expected data flow.
src/lang/index.d.ts Adds two new type entries for the new i18n keys but retains the now-unused settings-category-servers type declaration, leaving a dead entry in the type definition.
src/lang/en-us.json Adds the two new i18n keys with correct English values; the old settings-category-servers key remains unreferenced.
src/lang/hu-hu.json Adds the two new keys in English rather than Hungarian, unlike existing keys which are properly localized; same issue applies to all other non-English locale files.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[serverRegistry.listServers] --> B[sortedServers]
    B --> C{For each server}
    C --> D{builtinServers.some\ns.id === server.id}
    D -- Yes --> E[builtinServersList\ncategory: Built-in servers]
    D -- No --> F{isCustomServer\nserver.id}
    F -- Yes --> G[customServersList\ncategory: Custom servers]
    F -- No --> H[pluginServersList\ncategory: Plugin servers]
    E --> I[items array]
    H --> I
    G --> I
    I --> J[settingsPage render]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[serverRegistry.listServers] --> B[sortedServers]
    B --> C{For each server}
    C --> D{builtinServers.some\ns.id === server.id}
    D -- Yes --> E[builtinServersList\ncategory: Built-in servers]
    D -- No --> F{isCustomServer\nserver.id}
    F -- Yes --> G[customServersList\ncategory: Custom servers]
    F -- No --> H[pluginServersList\ncategory: Plugin servers]
    E --> I[items array]
    H --> I
    G --> I
    I --> J[settingsPage render]
Loading

Comments Outside Diff (1)

  1. src/lang/index.d.ts, line 654 (link)

    P2 Orphaned translation key settings-category-servers

    The settings-category-servers key is no longer referenced anywhere in the JavaScript source (it was replaced by settings-category-builtin-servers and settings-category-plugin-servers in lspSettings.js), but it still exists in index.d.ts and in all 32 language JSON files. This leaves dead translation strings in every locale file that will never be rendered, and the TypeScript type still surfaces the key as valid. The key should either be removed from index.d.ts and all language files, or retained intentionally with a comment explaining why.

Reviews (1): Last reviewed commit: "translation strings" | Re-trigger Greptile

Comment thread src/lang/en-us.json
@bajrangCoder bajrangCoder merged commit 034cec9 into main Jul 5, 2026
11 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in The Code Board - Acode Jul 5, 2026
@bajrangCoder bajrangCoder deleted the feat/lsp-settings-categories branch July 5, 2026 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request translations Anything related to Translations Whether a Issue or PR

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant