Vim: osc52 clipboard support

This commit is contained in:
Akemi Izuko 2024-08-31 20:06:16 -06:00
parent 397e891010
commit 92ebac366d
Signed by: akemi
GPG key ID: 8DE0764E1809E9FC
2 changed files with 19 additions and 2 deletions

View file

@ -11,7 +11,8 @@ set -g mouse on
# vi keybinds in copy mode
set-window-option -g mode-keys vi
set -g mode-keys vi
set-option -s set-clipboard off
set-option -s set-clipboard on
set -g allow-passthrough on
# Start window index at 1, for chromium-like tab switching
set -g base-index 1

View file

@ -36,6 +36,10 @@ if vim.fn.has('nvim') == 1 then
autostart = false,
}
lspconfig.clangd.setup{
autostart = false,
}
-- Function to start LSP
function LspUp()
vim.cmd[[LspStart]]
@ -72,9 +76,21 @@ vim.api.nvim_create_autocmd('LspAttach', {
end,
})
vim.api.nvim_create_autocmd("BufRead", {
callback = function()
vim.treesitter.stop()
end,
})
vim.g.clipboard = {
name = 'OSC 52',
copy = {
['+'] = require('vim.ui.clipboard.osc52').copy('+'),
['*'] = require('vim.ui.clipboard.osc52').copy('*'),
},
paste = {
['+'] = require('vim.ui.clipboard.osc52').paste('+'),
['*'] = require('vim.ui.clipboard.osc52').paste('*'),
},
}