fix: guarantee eager activation for vim/neovim extensions on Windows#205
Merged
Conversation
PR #193 injected `*` into activation events via ImplicitActivationEvents in the AbstractExtensionService constructor. This worked on macOS but on Windows cold starts the `coderm.extensions.eagerActivation` config value is sometimes not yet loaded at constructor time, leaving `_eagerExtensions` empty and falling back to the extension's declared events (e.g. vscode-neovim's `onCommand:type`, which only fires on first key press — exactly the symptom users reported). Add a second, authoritative activation path that does not depend on activation events at all: - New `_activateEagerExtensions()` invoked after `_initialize()` completes, where the config registry is guaranteed loaded. It uses `activateById()` to force-start each configured extension directly. - `_refreshEagerExtensionConfig()` keeps the `*` injection map in sync as a backup and for future extension scans. - An `onDidChangeConfiguration` listener re-runs both paths when the setting changes, so users can add/remove eager extensions without restarting. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This was referenced Jun 15, 2026
j4rviscmd
added a commit
that referenced
this pull request
Jun 15, 2026
Eager activation (coderm.extensions.eagerActivation, PR #193/#205) activates vscode-neovim early, but other startup work running afterwards occasionally strands focus on <body> (no pane focused), so vscode-neovim stops responding to normal-mode keys until the user alt+tabs away and back. Add StartupFocusGuardController that opens a short window after each eager extension finishes activating (onDidChangeExtensionsStatus + activationTimes) and refocuses the active editor group only when focus truly lands on nothing (getActiveElement() is body/html/null). Intentional focus moves (e.g. clicking the terminal) are respected. New setting: coderm.startup.focusGuard.enabled (default: true). Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
*injection inImplicitActivationEventsworked on macOS but failed on Windows cold starts: thecoderm.extensions.eagerActivationconfig value is sometimes not yet loaded atAbstractExtensionServiceconstructor time, leaving_eagerExtensionsempty and falling back to the extension's declared events (e.g. vscode-neovim 1.19.0's['onCommand:type', 'onStartupFinished']).onCommand:typeonly fires on first key press — exactly the reported symptom._activateEagerExtensions()invoked after_initialize()completes (config is guaranteed loaded by then), which usesactivateById()to force-start each configured extension directly.*injection as backup and for future extension scans (_refreshEagerExtensionConfig()).onDidChangeConfigurationlistener so users can add/remove eager extensions without a restart.Test plan
npm run watch[Coderm] Eagerly activating extension: asvetliakov.vscode-neovimlog appears in Output > Log (Extension Host)🤖 Generated with Claude Code