Original Author: landerson02
A Neovim plugin allows you to synchronize themes between Neovim and Ghostty, ensuring a consistent look between terminal and editor.
Use your favorite plugin manager, for example with lazy.nvim:
{
'chroy2/ghostty-theme-sync.nvim',
--- @type GhosttySyncConfig
opts = {
-- Add your configuration here
},
}- Ghostty
Run the command :GhosttyTheme to open the theme selection menu.
After selecting a new theme, you will need to refresh your ghostty config with cmd+shift+, or ctrl+shift+, on MacOS and Linux respectively.
The following options are the default:
Note
You may need to change your Ghostty config path
{
-- Path to your Ghostty config file
ghostty_config_path = "~/.config/ghostty/config",
-- Path to your Ghostty themes dir. Used for auto mapping from ghostty themes to nvim themes
ghostty_themes_path = "/usr/share/ghostty/themes/",
-- If you want to keep the nvim colorscheme change (like the ghostty change),
-- set this to true and point the config path to your config file that contains
-- a line of the form: `vim.cmd.colorscheme('<colorscheme>')`
-- The plugin will change this line to the selected theme
persist_nvim_theme = false,
nvim_config_path = "",
}Removed ghostty txt file and translation table for auto mapping
Warning
Assumes any themes name you use can be normalized to an alphanumeric version for auto-mapping