-
Notifications
You must be signed in to change notification settings - Fork 268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vis theme that accepts default terminal #1027
Comments
Try this one (decompress it first) |
Oops, I forgot to also pass-through the foreground color. Here you go. |
I tried something similar in See clear.lua |
This is actually interesting. Why wouldn’t you submit it here as PR? |
|
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 |
I don’t understand … isn’t the point of |
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. |
Actually, there is. 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 Is it possible to use the terminal cursor colors for background and foreground? |
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 #953 allows using the terminal cursor color! (I wish there was still a way to override it) I also wish was possible to set |
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 |
Line 22 in b828b5b
|
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 |
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. |
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.
The text was updated successfully, but these errors were encountered: