cspell-cli icon indicating copy to clipboard operation
cspell-cli copied to clipboard

Provide a way to extend a configuration from another repository (centralized config)

Open ssbarnea opened this issue 3 months ago • 1 comments

As lots of tools already support the magic _extends key in their config file, cspell would greatly benefit from it. I use the tool in tens of repositories and most of the time I have the same kind of config.

I would be much easier to be able to inherit a config from another github repo or url and use the local one to overlay on it.

Most tools supporting this use a syntax like:

# loads same file path from this parent directory:
_extends: gh_org/gh_repo

# alternative for loads from an URL
_extends: https://.../config.yml
  • All the tools based on probot-config support this because it provides it for free.
  • Renovate has a similar functionality

PS. I know that there is an existing feature that allows loading of additional config files from disk, but this has no practical use for centralized config.

ssbarnea avatar Sep 04 '25 10:09 ssbarnea

@ssbarnea,

Doesn't import work for you?

import:
  # from a URL
  - https://cdn.jsdelivr.net/npm/@cspell/dict-scientific-terms-us/cspell-ext.json
  # from node_modules
  - '@cspell/dict-elisp/cspell-ext.json'
  # relative
  - '../cspell.config.yaml'
dictionaries:
  - scientific-terms-us

Jason3S avatar Sep 07 '25 04:09 Jason3S