Closed TroySigX closed 1 year ago
Describe the bug
I have the following code written in TypeScript:
export function flipColors(c: number[]): number[] { return c.map((channel, id) => Math.floor((c[(id + 1) % 3] + c[(id + 2) % 3]) / 2)); }
I notice that the inner brackets (parentheses covering id + 1 and id + 2 aren't colored)
id + 1
id + 2
Here is my config:
local rainbow = require 'ts-rainbow' require('nvim-treesitter.configs').setup({ rainbow = { enable = true, query = { 'rainbow-parens' }, extended_mode = true, strategy = rainbow.strategy.global, hlgroups = { 'TSRainbowBlue', 'TSRainbowViolet', 'TSRainbowOrange', 'TSRainbowGreen', 'TSRainbowYellow', 'TSRainbowRed', 'TSRainbowCyan', }, } })
My color theme is gruvbox-material
gruvbox-material
Screenshots
It should be fixed now on master. The issue was a missing pattern for parenthesized_expression in the Javascript query (the Typescript query inherits from the Javascript one).
master
parenthesized_expression
Thanks for your quick action!
Describe the bug
I have the following code written in TypeScript:
I notice that the inner brackets (parentheses covering
id + 1
andid + 2
aren't colored)Here is my config:
My color theme is
gruvbox-material
Screenshots