fix(options): dont set clipboard in an SSH session, so that OSC52 can be enabled (when supported)

This commit is contained in:
Folke Lemaitre 2024-03-11 23:13:48 +01:00
parent 78e6405f90
commit 1c9f4160a2
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
2 changed files with 7 additions and 24 deletions

View file

@ -15,7 +15,13 @@ vim.g.root_spec = { "lsp", { ".git", "lua" }, "cwd" }
local opt = vim.opt
opt.autowrite = true -- Enable auto write
opt.clipboard = "unnamedplus" -- Sync with system clipboard
if not vim.env.SSH_TTY then
-- only set clipboard if not in ssh, to make sure the OSC 52
-- integration works automatically. Requires Neovim >= 0.10.0
opt.clipboard = "unnamedplus" -- Sync with system clipboard
end
opt.completeopt = "menu,menuone,noselect"
opt.conceallevel = 2 -- Hide * markup for bold and italic, but not markers with substitutions
opt.confirm = true -- Confirm to save changes before exiting modified buffer