Skip to content
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

terminal native colorschemes? #1044

Closed
apprehensions opened this issue Oct 16, 2022 · 8 comments
Closed

terminal native colorschemes? #1044

apprehensions opened this issue Oct 16, 2022 · 8 comments

Comments

@apprehensions
Copy link
Contributor

currently is it possible to use the terminal's colors (eg. ANSI (\e[1;31m)) instead of internal vis colorschemes?

@ninewise
Copy link
Collaborator

Check this thread: #1027

@apprehensions
Copy link
Contributor Author

still don't get it

@mcepl
Copy link
Contributor

mcepl commented Nov 10, 2022

@ninewise, isn’t this just a duplicate of #1027? Shouldn’t it be closed as such?

@apprehensions
Copy link
Contributor Author

it still has,,,not been revealed to me how to make a terminal native colorschrme

@erf
Copy link
Contributor

erf commented Nov 11, 2022

you can use the clear.lua plugin in my vis-minimal-theme which uses a clear background color (so the terminal background is used) and the terminal foreground color. we can't use the full native terminal color scheme as it's not accessible in the editor AFAIK

@apprehensions
Copy link
Contributor Author

as it's not accessible in the editor

Well, that just means this issue stays open.
Isn't ESC[X;XXm possible with colors?

@ninewise
Copy link
Collaborator

Well it is still a duplicate, and the other issue has more info.

@apprehensions
Copy link
Contributor Author

apprehensions commented Feb 2, 2023

vis/ui-terminal-vt100.c

Lines 56 to 64 in 1a958f2

#define CELL_COLOR_BLACK { .index = 0 }
#define CELL_COLOR_RED { .index = 1 }
#define CELL_COLOR_GREEN { .index = 2 }
#define CELL_COLOR_YELLOW { .index = 3 }
#define CELL_COLOR_BLUE { .index = 4 }
#define CELL_COLOR_MAGENTA { .index = 5 }
#define CELL_COLOR_CYAN { .index = 6 }
#define CELL_COLOR_WHITE { .index = 7 }
#define CELL_COLOR_DEFAULT { .index = 9 }

buffer_appendf(buf, "\x1b[%dm", 30 + fg.index);

this simply needs to be extended to the other 8 colors; like 32 and 92, both being normal and high green color.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants