Closed jdandrea closed 1 week ago
coc.nvim already supported to active extensions on filetype with activationEvents
, for example coc-json will be only activated on json
and jsonc
files.
The coc-vale
extension declares activationEvents
to *
, this makes coc.nvim activate it on every filetypes.
The Problem
There are some CoC extensions I want to be active only for specific file types.
A Possible Solution
Perhaps allow for configuration within
coc-settings.json
. (Unless this sort of thing already exists and I'm just missing it.)For example, to set
coc-vale
as active only when editing AsciiDoc or Markdown files:Alternatives
Here's another way to do it, within Neovim rc:
... except this is more bespoke and can lead to errors within Neovim like
[coc.nvim]: Error on notification "deactivateExtension": TypeError: Cannot read properties of undefined (reading 'dispose')