Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend '*': 0 by inheriting default options. #42

Open
amerlyq opened this issue Nov 26, 2015 · 1 comment
Open

Extend '*': 0 by inheriting default options. #42

amerlyq opened this issue Nov 26, 2015 · 1 comment

Comments

@amerlyq
Copy link

amerlyq commented Nov 26, 2015

Usecase:
I want use plugin only for lisp, vimscript and zsh.
If I disable for all by let g:rainbow_conf = {'separately': {'*': 0, 'lisp':{}, ...}}, then I need to copypaste whole definition for vimscript, bloating my vimrc.

Currently there are two possible cases:
'*': {} -- apply default config to all filetypes (user's specified and default for plugin)
'*': 0 -- don't apply to any, beside specified in user's g:rainbow_conf.separately
Therefore there are no case to disable for all types beside user, but inherit all defaults from plugin.
Maybe, by specifying '*': 1 we could inherit all default types, but disable for all other filetypes?
Then one could disable, as example, only xml and css by inserting '*': 1, 'xml': 0, 'css': 0.
And by specifying '*': 0, 'xhtml': 1 one could inherit definitions only for xhtml?

Distinct value 1 is necessary, because we must distinguish cases when we inherit general common profile by 'lisp': {}, or inherit specific default config from plugin by 'lisp': 1. Otherwise we lose ability to overwrite default plugin config by its general settings -- like resetting default values for css: 'css': {}.

@luochen1990
Copy link
Owner

A new option "default" is added now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants