I have added a region for the selected text with a syntax scope but it changes the background, any proper approach to change only the foreground color.
view.add_regions(‘a_unique_id’, view.sel(), ‘markup.clarity’)
I have added a region for the selected text with a syntax scope but it changes the background, any proper approach to change only the foreground color.
view.add_regions(‘a_unique_id’, view.sel(), ‘markup.clarity’)
Yes, you must assign this scope another background color, which is different from color scheme’s background color. You can assign a very similar color to minimize this side effect but it must be different.