0

I included this code into user.lua: styles.operator = {fg = {104,151,187}} The color of operators has changed, everthing is ok with operators, such as =, ==, <, but somehow 3 kind of brackets also changed their color. Please help me to change their color, or may be to exclude brackets from styles.operator class or whatever it's called. With great hope I'm waithing for help!

I tried to alter this code in user-sample.lua which is ment to exclude words return and break from the list of keywords:

local luaspec = ide.specs.lua

local num = #luaspec.keywords
-- take a new slot in the list of keywords (starting from 1)
luaspec.keywords[num+1] = 'return break'
-- remove 'return' from the list of "regular" keywords
luaspec.keywords[1] = luaspec.keywords[1]:gsub(' return', ''):gsub(' break', '')

-- assign new style to the added slot (starting from 0)
styles["keywords"..num] = {fg = {189, 21, 79}, b = true}

Like this:

local luaspec2 = ide.specs.lua
local num2 = #luaspec2.operator
-- take a new slot in the list of keywords (starting from 1)
luaspec2.operator[num2+1] = '() [] {}'
-- remove 'return' from the list of "regular" keywords
luaspec2.operator = luaspec2.operator:gsub(' {}', ''):gsub(' ()', ''):gsub(' []', '')

-- assign new style to the added slot (starting from 0)
styles["operator"..num2] = {fg = {189, 21, 79}, b = true}

But nothing happened.

ddd ddd
  • 1
  • 1

0 Answers0