Skip to content

8-color/3-bit fallback (for tty) #759

Answered by vollowx
MithicSpirit asked this question in Q&A
Discussion options

You must be logged in to vote

Try the following code snippet, since the default colorscheme supports TTY best.

-- At where you set the colorscheme

vim.g.has_ui = #vim.api.nvim_list_uis() > 0
vim.g.has_gui = vim.g.has_ui and (vim.env.DISPLAY ~= nil or vim.env.WAYLAND_DISPLAY ~= nil)

if not vim.g.has_gui then
  if vim.g.has_ui then
    vim.cmd.colorscheme('default')
  end
  return
end

vim.cmd.colorscheme({
  args = { 'catppuccin' },
  mods = { emsg_silent = true },
})

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by vollowx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
enhancement New feature or request
2 participants
Converted from issue

This discussion was converted from issue #588 on August 11, 2024 13:58.