feat: add setting to toggle language package completion#2361
Conversation
Greptile SummaryThis PR adds a
Confidence Score: 5/5Safe to merge. The change adds an opt-in toggle defaulting to the current behavior, so no existing functionality is altered unless the user explicitly disables the setting. All three of the explicitly re-added completion sources (LSP, local word, Emmet) are correctly gated behind their own existing settings checks inside the override array, and the facet-based LSP gate evaluates at completion time so it picks up late-attached servers. The default value preserves the pre-PR behavior for all existing users. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[User triggers completion] --> B{languageCompletion\nsetting}
B -- true / default --> C[autocompletion\nno override]
C --> D[CodeMirror normal\nsource discovery]
D --> E[Language package completions\nkeywords / snippets]
D --> F[LSP via serverCompletion\nextension]
D --> G[Local word via\nlanguageData]
D --> H[Emmet via\nmaybeAttachEmmetCompletions]
B -- false --> I[autocompletion\noverride array]
I --> J{lspCompletionEnabled\nfacet?}
J -- true --> K[serverCompletionSource]
J -- false --> L[null / skip LSP]
I --> M{localWordCompletion\nsetting?}
M -- true --> N[localWordCompletionSource]
M -- false --> O[skip]
I --> P{useEmmet\nsetting?}
P -- true --> Q[getEmmetCompletionSource\nwith try/catch]
P -- false --> R[skip]
I --> S[Language package completions\nBYPASSED]
%%{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[User triggers completion] --> B{languageCompletion\nsetting}
B -- true / default --> C[autocompletion\nno override]
C --> D[CodeMirror normal\nsource discovery]
D --> E[Language package completions\nkeywords / snippets]
D --> F[LSP via serverCompletion\nextension]
D --> G[Local word via\nlanguageData]
D --> H[Emmet via\nmaybeAttachEmmetCompletions]
B -- false --> I[autocompletion\noverride array]
I --> J{lspCompletionEnabled\nfacet?}
J -- true --> K[serverCompletionSource]
J -- false --> L[null / skip LSP]
I --> M{localWordCompletion\nsetting?}
M -- true --> N[localWordCompletionSource]
M -- false --> O[skip]
I --> P{useEmmet\nsetting?}
P -- true --> Q[getEmmetCompletionSource\nwith try/catch]
P -- false --> R[skip]
I --> S[Language package completions\nBYPASSED]
Reviews (2): Last reviewed commit: "docs" | Re-trigger Greptile |
No description provided.