rgieseke / textredux

Text-based interfaces for Textadept
http://rgieseke.github.io/textredux/
Other
59 stars 11 forks source link

reduxstyle missing property? #52

Closed ghost closed 4 years ago

ghost commented 4 years ago

The documentation for reduxstyle states the following: reduxstyle.list_match_highlight.fore = reduxstyle.class.fore However during my tests neither of these had the fore property.

I was trying to have TR automatically use the same colors for the file dialogs as in the buffer list. The colors for the buffer list are set in list.lua. Hoever the colors for the file dialogs are set in fs.lua. The problem here is that they don't work. The file dialogs will not use their assigned colors but instead use the default (text) color.
Assigning the colors manually via reduxstyle.list_match_highlight.fore = #123456 does work because you are creating the necessary property.

Is this working as intended or am I maybe missing something?

rgieseke commented 4 years ago

You mean styles don't appear as you'd expect them from what's in the code?

like

--- The style used for ordinary file entries.
reduxstyle.fs_file = reduxstyle.string
ghost commented 4 years ago

Correct. It works for the buffer list but not for the file related dialogs (open, open home, etc.). These simply use the default text color.
Does it work for you?

rgieseke commented 4 years ago

Yes, in the buffer list and the file open dialog files appear using the string style for me.

rgieseke commented 4 years ago

Have you tried with a minimal init.lua with only textredux?

ghost commented 4 years ago

How are you including TR? I'm only making this call after I set my TA theme: require('textredux').hijack()

rgieseke commented 4 years ago

Same:

local textredux = require("textredux") textredux.hijack()

Are you on 10.6? I haven't updated yet on this box.

ghost commented 4 years ago

Yes, I'm on 10.6 but that is not the problem. Apparently the problem is that I'm calling textredux = require('textredux') in my ~/.textadept/modules/textadept/keys.lua. I'm not sure how this interferes but it does. I'll try moving my keybinds back into init.lua and see if that fixes it.

rgieseke commented 4 years ago

Great, let me know if there still are problems, also about the "fore" property. It could well be that parts of the documentation are out-dated.

As for "keys.lua" -- i think processing keys and menus is done last in "modules/textadept/init.lua". Maybe this leads to something not being processed in the order required for having the style already set.