Closed davidsierradz closed 1 year ago
Does setting the strategy to noop
not work?
Basically, I want to enable rainbow delimiters only on lisp-like languages, is this use-case valid?
That does sound like a reasonable thing to want to do. I think having an explicit whitelist and blacklist in the settings would be better, otherwise I have to run a bunch of logic and waste resources just to set up a bunch of machinery that does nothing.
Does setting the strategy to noop not work?
Yeah, after commit bc1e12be89d46190f4ca798e10a9203d90248b22:
Before (5a074244a40f9e2e0ba219268c69cb256ce16696):
Same config:
local rainbow_delimiters = require('rainbow-delimiters')
vim.g.rainbow_delimiters = {
strategy = {
[''] = rainbow_delimiters.strategy['noop'],
clojure = rainbow_delimiters.strategy['global'],
fennel = rainbow_delimiters.strategy['global'],
commonlisp = rainbow_delimiters.strategy['global'],
query = rainbow_delimiters.strategy['global'],
janet = rainbow_delimiters.strategy['global'],
racket = rainbow_delimiters.strategy['global'],
scheme = rainbow_delimiters.strategy['global'],
},
highlight = {
'@rainbow.1',
'@rainbow.2',
'@rainbow.3',
'@rainbow.4',
'@rainbow.5',
'@rainbow.6',
},
}
The fallback setting should work now again. Please try out the latest master
.
I still want to implement white- and blacklist eventually, but this should work
in the meantime.
Thanks! Confirming that it works again!
FYI, white- and blacklisting is implemented now. You can add an explicit list of languages for which you want rainbow delimiters enabled:
vim.g.rainbow_delimiters = {
-- ... your configuration
whitelist = {'commonlisp', 'clojure', 'scheme', 'fennel', 'janet', 'racket'}
}
This will abort the machinery much earlier than if you set noop
as your strategy.
Neovim version
nightly
Language affected
No response
Query
No response
Strategy
No response
Description
Hi, before commit bc1e12be89d46190f4ca798e10a9203d90248b22, I could implement a whitelist only setup enabled with a defined set of languages:
Basically, I want to enable rainbow delimiters only on lisp-like languages, is this use-case valid?
Thanks