neoclide/coc.nvim · error · Error
extension ${name} is disabled
Error message
extension ${name} is disabled What it means
Thrown by ExtensionManager.load() when the extension loaded successfully but is listed in the user's disabled extensions state. coc refuses to load/activate it and reports the name.
Source
Thrown at src/extension/manager.ts:667
public async load(filepath: string, active: boolean, options?: ExtensionLoadOptions): Promise<ExportExtension> {
let name: string
if (options?.sourceCode) {
let extensionRoot = options.extensionRoot ?? filepath
let obj = loadJson(path.join(extensionRoot, 'package.json')) as any
name = obj.name
if (!name) throw new Error(`Unable to load extension at ${extensionRoot}, missing package.json`)
await this.unloadExtension(name)
await this.registerExtension(extensionRoot, obj, ExtensionType.Local, true, options)
} else if (isDirectory(filepath)) {
let obj = loadJson(path.join(filepath, 'package.json')) as any
name = obj.name
await this.loadExtension(filepath, true)
} else {
name = await this.loadExtensionFile(filepath, true)
}
if (!name) throw new Error(`Unable to load extension at ${filepath}`)
let disabled = this.states.isDisabled(name)
if (disabled) throw new Error(`extension ${name} is disabled`)
let item = this.getExtension(name)
if (active) await this.activate(name)
return {
get isActive() {
return item.extension.isActive
},
get name() {
return name
},
get api() {
return item.extension.exports
},
get exports() {
let module = item.extension.module ?? {}
return omit(module, ['activate'])
},
get _exports() {
return global.__isMain ? undefined : item.extension.moduleView on GitHub (pinned to 50e974d969)
Solutions
- Enable the extension: :CocList extensions then toggle it on, or remove it from disabled list via `coc.extensions.toggle(name)`
- Remove the extension name from the disabled-extensions configuration/state
- Choose a different extension name if a conflict with a disabled one is unintended
Defensive patterns
Strategy: validation
Validate before calling
const name = getExtensionName(filepath); // from package.json if (coc.extensions.isDisabled(name)) await coc.extensions.toggle(name); // or abort
Try / catch
try {
await coc.extensions.load(filepath, true);
} catch (e) {
if (String(e.message).endsWith(' is disabled')) {
const name = String(e.message).match(/extension (.+) is disabled/)?.[1];
if (name) await coc.extensions.toggle(name);
} else throw e;
} Prevention
- Check disabled-extensions list before scripted loads
- Avoid disabling extensions you auto-load at startup
When it happens
Trigger: Calling coc.extensions.load() for an extension whose name appears in coc.extensions.disabled-extensions (or previously disabled via coc.extensions.toggle), so states.isDisabled(name) is true.
Common situations: User disabled the extension earlier via :CocList extensions; loading an extension from config that was intentionally disabled; automated scripts loading a disabled extension.
Related errors
- Unable to load extension at ${extensionRoot}, missing packag
- Unable to load extension at ${filepath}
- Required root pattern not resolved.
- Unexpected messageDialogKind: ${this.messageDialogKind}
- Unexpected messageReportKind: ${msgReportKind}
AI-assisted analysis of neoclide/coc.nvim@50e974d969 (2026-08-31).
Data as JSON: /api/errors/02b8f97c9c1cea3a.
Report an issue: GitHub.