mirror of
https://github.com/neovim/neovim.git
synced 2026-04-20 06:20:53 +00:00
feat(defaults): enable 'termguicolors' by default when supported by terminal
Enable 'termguicolors' automatically when Nvim can detect that truecolor is supported by the host terminal. If $COLORTERM is set to "truecolor" or "24bit", or the terminal's terminfo entry contains capabilities for Tc, RGB, or setrgbf and setrgbb, then we assume that the terminal supports truecolor. Otherwise, the terminal is queried (using both XTGETTCAP and SGR + DECRQSS). If the terminal's response to these queries (if any) indicates that it supports truecolor, then 'termguicolors' is enabled.
This commit is contained in:
4
runtime/lua/vim/_meta/options.lua
generated
4
runtime/lua/vim/_meta/options.lua
generated
@@ -6941,6 +6941,10 @@ vim.go.tbidi = vim.go.termbidi
|
||||
--- attributes instead of "cterm" attributes. `guifg`
|
||||
--- Requires an ISO-8613-3 compatible terminal.
|
||||
---
|
||||
--- Nvim will automatically attempt to determine if the host terminal
|
||||
--- supports 24-bit color and will enable this option if it does
|
||||
--- (unless explicitly disabled by the user).
|
||||
---
|
||||
--- @type boolean
|
||||
vim.o.termguicolors = false
|
||||
vim.o.tgc = vim.o.termguicolors
|
||||
|
||||
Reference in New Issue
Block a user