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

How to change the search highlight color #77

Closed
zer09 opened this issue Sep 19, 2021 · 5 comments
Closed

How to change the search highlight color #77

zer09 opened this issue Sep 19, 2021 · 5 comments

Comments

@zer09
Copy link

zer09 commented Sep 19, 2021

Hello good day,

Previously I'm using base16-vim colortheme, and using the search highlight color of #dae84d.

How I can change the search highlight color to #dae84d?

Thanks

@ful1e5
Copy link
Member

ful1e5 commented Sep 20, 2021

require("github-theme").setup({
  colors = {bg_search = "#dae84d", fg_search = "#000000"}
})

check README.md#configuration for other configuration.

@ful1e5 ful1e5 closed this as completed Sep 20, 2021
@zer09
Copy link
Author

zer09 commented Sep 20, 2021

@ful1e5

I tried this

let g:github_colors = [bg_search = "#dae84d", error = "#000000"]
colorscheme github_dark_default

But I got E121: Undefined variable: bg_search

The same with the readme example

" Change the "hint" color to the "orange" color, and make the "error" color bright red
let g:github_colors = [hint = "orange", error = "#ff0000"]

This will error to E121: Undefined variable: hint

@ful1e5
Copy link
Member

ful1e5 commented Sep 21, 2021

There are some bugs in this theme regarding .vim config support. So, stick with lua until I manage to fix it.

vim.g.github_colors = {bg_search = "#dae84d", fg_search = "#000000"}
vim.cmd [[ colorscheme github_dark_default]]

@ful1e5
Copy link
Member

ful1e5 commented Sep 21, 2021

Also, You have to wrap this 👆 config with lua << EOF ... EOF for .vim config.

lua << EOF
vim.g.github_colors = {bg_search = "#dae84d", fg_search = "#000000"}
vim.cmd [[ colorscheme github_dark_default]]
EOF

@ful1e5
Copy link
Member

ful1e5 commented Sep 26, 2021

Here is the vim workaround. Also updated the docs 🙂

let g:github_colors = {
  \ 'error': '#dae84d',
  \ 'fg_search': '#000000'
\ }

colorscheme github_dark_default

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

2 participants