Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions nvim/.config/nvim/lua/config/options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,31 @@ vim.g.snacks_animate = false
-- display all thing that are usually concealed (such as backticks in Markdown files)
vim.opt.conceallevel = 0

-- OSC52 clipboard integration for remote/container environments.
-- Set NVIM_CLIPBOARD=osc52 (e.g. in your Dockerfile, docker-compose, or .bashrc)
-- to enable clipboard bridging over SSH and inside containers via terminal escape
-- sequences. Requires Neovim 0.10+ and a terminal that supports OSC52
-- (iTerm2, WezTerm, Alacritty, Kitty, Ghostty, Windows Terminal, etc.)
if vim.fn.has("nvim-0.10") == 1 and vim.env.NVIM_CLIPBOARD == "osc52" then
local function paste()
return {
vim.split(vim.fn.getreg(""), "\n"),
vim.fn.getregtype(""),
}
end

vim.g.clipboard = {
name = "OSC 52",
copy = {
["+"] = require("vim.ui.clipboard.osc52").copy("+"),
["*"] = require("vim.ui.clipboard.osc52").copy("*"),
},
paste = {
["+"] = paste,
["*"] = paste,
},
}
end

-- Use the system clipboard for all yank/delete/change operations
vim.opt.clipboard = "unnamedplus"
Loading