vis theme that accepts default terminal
Hi is there a vis theme that just allows the default terminal to passthrough?
Nano on the left and vis on the right:

I'd like for vis to be like the nano color on the left which is just my kitty default terminal theme.
Try this one (decompress it first)

Oops, I forgot to also pass-through the foreground color. Here you go.
I tried something similar in https://github.com/erf/vis-minimal-theme
See clear.lua
I tried something similar in https://github.com/erf/vis-minimal-theme
See clear.lua
This is actually interesting. Why wouldn’t you submit it here as PR?

clear.lua from https://github.com/erf/vis-minimal-theme is setting the foreground color just as my theme did before.
Yes i still do custom theming. I only set the background color to transparent. I don't think there is a way to get the terminal color.
@qiu-x Is this the transformation of your changes to vis-minimal-theme:
diff --git a/clear.lua b/clear.lua
index 4a7487f..e2a4b49 100644
--- a/clear.lua
+++ b/clear.lua
@@ -13,7 +13,7 @@ local clear0 = '#00000000'
local lexers = vis.lexers
-lexers.STYLE_DEFAULT ='back:'..clear0..',fore:'..black0
+lexers.STYLE_DEFAULT =''
lexers.STYLE_NOTHING = 'back:'..white0
lexers.STYLE_CLASS = 'fore:'..black0
lexers.STYLE_COMMENT = 'fore:'..white2
@@ -33,14 +33,14 @@ lexers.STYLE_TYPE = 'fore:'..black0
lexers.STYLE_VARIABLE = 'fore:'..black0
lexers.STYLE_WHITESPACE = ''
lexers.STYLE_EMBEDDED = 'back:'..white1
-lexers.STYLE_IDENTIFIER = 'fore:'..black0
+lexers.STYLE_IDENTIFIER = ''
-lexers.STYLE_LINENUMBER = 'fore:'..black1
+-- lexers.STYLE_LINENUMBER = 'fore:'..black1
lexers.STYLE_LINENUMBER_CURSOR = lexers.STYLE_LINENUMBER
lexers.STYLE_CURSOR = 'back:'..white2
lexers.STYLE_CURSOR_PRIMARY = lexers.STYLE_CURSOR..',fore:'..black1
lexers.STYLE_CURSOR_LINE = 'underlined'
-lexers.STYLE_COLOR_COLUMN = 'back:'..white1
+lexers.STYLE_COLOR_COLUMN = 'back:'..'#d3d7cf'
lexers.STYLE_SELECTION = 'back:'..white1
lexers.STYLE_STATUS = 'reverse'
lexers.STYLE_STATUS_FOCUSED = 'back:'..white1..',fore:'..black1
I added a dark-clear.lua and light-clear.lua now in https://github.com/erf/vis-minimal-theme for use with both black and white terminal backgrounds.
I added a
dark-clear.luaandlight-clear.luanow in https://github.com/erf/vis-minimal-theme for use with both black and white terminal backgrounds.
I don’t understand … isn’t the point of clear theme that it shouldn’t interfere with the terminal settings, i.e., it shouldn’t matter you have set as a background?
It only sets the background of vis to clear. The foreground is either set to a black or white color scheme. There is no way to get the terminal foreground color.
There is no way to get the terminal foreground color.
Actually, there is. vis by default (without any theme enabled) uses the terminal foreground color. So if the theme doesn't override it, like here:
lexers.STYLE_DEFAULT = ''
Then the foreground color will be used.
Oh i did not know that. That's awesome! I wish the terminal foreground color was available in the Lua API so we could is it to makes shades / palette of that color, but i guess it's one thing to print text with the color but another thing to actually get the color from the terminal as there is not a common terminal control code to actually get the color AFAIK.
PS: I updated https://github.com/erf/vis-minimal-theme to include a clear.lua now to use the terminal color and no syntax highlighting.
Is it possible to use the terminal cursor colors for background and foreground?
@qiu-x Is this the transformation of your changes to vis-minimal-theme:
Honestly, I think it's not possible to use any predefined colors in a theme that is supposed to work with any background color. But we can use italics/bold/underline to compensate.
-- vis-minimal-theme (https://github.com/erf/vis-minimal-theme)
-- clear by Erlend Lind Madsen
-- uses a transparent background and the terminal foreground
-- Now with extra syntax highlighting ;^)
local white2 = '#989898'
local clear0 = '#00000000'
local lexers = vis.lexers
lexers.STYLE_DEFAULT ='back:'..clear0
lexers.STYLE_NOTHING = ''
lexers.STYLE_CLASS = 'fore:,bold'
lexers.STYLE_COMMENT = 'fore:,italics'
lexers.STYLE_CONSTANT = 'fore:'
lexers.STYLE_DEFINITION = 'fore:'
lexers.STYLE_ERROR = 'fore:,bold'
lexers.STYLE_FUNCTION = 'fore:,bold'
lexers.STYLE_KEYWORD = 'fore:,bold'
lexers.STYLE_LABEL = 'fore:,underline'
lexers.STYLE_NUMBER = 'fore:'
lexers.STYLE_OPERATOR = 'fore:'
lexers.STYLE_REGEX = 'fore:,italics'
lexers.STYLE_STRING = 'fore:,italics'
lexers.STYLE_PREPROCESSOR = 'fore:,bold'
lexers.STYLE_TAG = 'fore:,underline'
lexers.STYLE_TYPE = 'fore:,bold'
lexers.STYLE_VARIABLE = 'fore:'
lexers.STYLE_WHITESPACE = ''
lexers.STYLE_EMBEDDED = 'back:'..clear0
lexers.STYLE_IDENTIFIER = 'fore:'
lexers.STYLE_LINENUMBER = 'fore:'
lexers.STYLE_LINENUMBER_CURSOR = lexers.STYLE_LINENUMBER
lexers.STYLE_CURSOR = 'back:'..white2
lexers.STYLE_CURSOR_PRIMARY = lexers.STYLE_CURSOR
lexers.STYLE_CURSOR_LINE = 'underlined'
lexers.STYLE_COLOR_COLUMN = 'back:'..white2
lexers.STYLE_SELECTION = 'back:'..white2
lexers.STYLE_STATUS = 'reverse'
lexers.STYLE_STATUS_FOCUSED = 'back:'..white2
lexers.STYLE_SEPARATOR = lexers.STYLE_DEFAULT
lexers.STYLE_INFO = 'fore:default,back:default'
lexers.STYLE_EOF = ''
Edit: screenshot
Nice! Added it. Feel free to make PR's to improve further.
This PR https://github.com/martanne/vis/pull/953 allows using the terminal cursor color! (I wish there was still a way to override it)
I also wish was possible to set STYLE_SELECTION blank and use the terminal selection color.
What is the state of this ticket? What remains?
I think this can be closed - I've mentioned the vis-minimal-theme, you can use clear.lua to use the terminal background / foreground.
https://github.com/martanne/vis/blob/b828b5b986a576196cda2ccba13579de96772ebd/lua/vis-std.lua#L22
What do you mean @apprehensions?
@ninewise said my issue was a duplicate, without telling me vis actually has native terminal colorscheme support, just lacking some colors. i just pointed the vis-std to it to ''clarify''
Ok, I see. Thanks for clarifying. Don’t forget that people are subscribed to issues, and don’t necessarily have the context of other issues when receiving notifications, or when reading an issue from top to bottom. So context is important when writing comments.