macOS: Phantom Clipboard Input on Neovim Startup #7115
-
First, thank you mitchellh (removed tagging, sorry!) for creating Ghostty—it's an amazing terminal! MacOS Sequoia 15.4 (24E248) Ghostty 1.1.3
Version
- version: 1.1.3
- channel: stable
Build Config
- Zig version: 0.13.0
- build mode : builtin.OptimizeMode.ReleaseFast
- app runtime: apprt.Runtime.none
- font engine: font.main.Backend.coretext
- renderer : renderer.Metal
- libxev : main.Backend.kqueue My ghostty configuration #~/.config/ghostty/config
shell-integration = zsh
font-family = "JetBrainsMono Nerd Font Mono"
font-size = 18
font-feature = -calt, -liga, -dlig
cursor-invert-fg-bg = true IssueWhen starting Neovim, the contents of my clipboard are automatically "pasted" into the buffer. This happens even without any explicit paste command. Steps to ReproduceCopy text (e.g., hjkl) to clipboard. Open Neovim—the clipboard content (hjkl) is inserted automatically. Similarly, opening a file (e.g., ~/.config/ghostty/config) overwrites its contents with the clipboard text. ObservationsIsolating the Cause: Tested with plugins disabled → Issue only occurs when theme is active. Other plugins work fine; the problem seems theme-specific, or invoking the "vim.cmd" or "vim.api.nvim_command" Ghostty vs. Tmux:The issue does not occur in Tmux, only in Ghostty. Attachments Let me know if you need additional details! neovim-ghostty-phantom-input-compress-2.movI'm using Neovim version v0.11.0 NVIM v0.11.0
Build type: Release
LuaJIT 2.1.1744014795 -- Catppuccin theme, loaded by lazy.nvim
return {
"catppuccin/nvim",
name = "catppuccin",
lazy = false,
priority = 1000,
enabled = true,
config = function()
local catppuccin = require("catppuccin")
-- local macchiato = require("catppuccin.palettes").get_palette("macchiato")
local frappe = require("catppuccin.palettes").get_palette("frappe")
local mocha = require("catppuccin.palettes").get_palette("mocha")
local bright_orange = "#ffaa00"
catppuccin.setup({
transparent_background = false,
flavor = "mocha",
background = { -- :h background
light = "latte",
dark = "mocha",
},
no_italic = false,
no_bold = false,
color_overrides = {
mocha = {
-- base = "#000000",
-- mantle = "#000000",
crust = bright_orange,
},
},
highlight_overrides = {
mocha = function(colors)
return {
-- Pmenu = { bg = colors.base }, -- Use colors.base palette in Pmenu background, based on "flavor"
-- WildMenu = { bg = mocha.crust }, -- command-line pop-up menu
Pmenu = { bg = mocha.crust }, -- completion pop-up menu
NormalFloat = { bg = mocha.crust }, -- LSP documentation menu
DapStopped = { fg = colors.none, bg = frappe.mantle }, -- Use frappe for dap_ui
-- vim.api.nvim_set_hl(0, 'DapStopped', { bg = '#31353f' })
}
end,
},
integrations = {
treesitter = true,
native_lsp = {
enabled = true,
virtual_text = {
errors = { "italic" },
hints = { "italic" },
warnings = { "italic" },
information = { "italic" },
ok = { "italic" },
},
underlines = {
errors = { "underline" },
hints = { "underline" },
warnings = { "underline" },
information = { "underline" },
ok = { "underline" },
},
inlay_hints = {
background = true,
},
},
illuminate = true,
indent_blankline = {
enabled = true,
},
dap = true,
dap_ui = true,
},
})
vim.fn.sign_define("DapStopped", { text = "", linehl = "DapStopped", numhl = "DapStopped" })
-- vim.cmd([[colorscheme catppuccin]])
vim.api.nvim_command("colorscheme catppuccin")
-- vim.opt.colorscheme = "catppuccin"
end,
} |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
First, please don’t ping Mitchell or other Ghostty maintainers. Doing so subscribes them automatically to a boatload of notifications through GitHub’s no-so-great notification defaults and generally just clogs up their inboxes as well as jumping the Discussions flow. I use Neovim and Ghostty daily on macOS, and have never seen this issue. Can you reproduce this issue with the Terminal Inspector open and share the output of the I/O tab? That may give us a better idea of what’s going on. Side note of my own…. I am not sure how this post didn’t get the Issue Triage template applied to it. I just searched and apparently select platforms don’t support the form yet (mobile is the only one explicitly mentioned but I suspect this wasn’t written on mobile). Thanks for sharing all this info, it pretty much covers what the template requires. Do you mind also mentioning how you created this so we can look into it? |
Beta Was this translation helpful? Give feedback.
-
Thanks, taylrfnt! I’ve removed the tag—appreciate the heads-up. After further testing, I’ve noticed the same issue occurs in iTerm and Kitty, which makes me suspect this is tied to Neovim v0.11.0. I’m documenting this here in case others run into the same problem. For reference, it seems related to Since this isn’t Ghostty-specific, feel free to close the thread. For context, I’ve attached a recording with Terminal Inspector (comparing Ghostty and Tmux). ghostty-inspector-neovim.mp4 |
Beta Was this translation helpful? Give feedback.
Thanks! I continue this issue in another thread
neovim/neovim#33148