Vim: osc52 clipboard support
This commit is contained in:
parent
397e891010
commit
92ebac366d
2 changed files with 19 additions and 2 deletions
|
@ -11,7 +11,8 @@ set -g mouse on
|
||||||
# vi keybinds in copy mode
|
# vi keybinds in copy mode
|
||||||
set-window-option -g mode-keys vi
|
set-window-option -g mode-keys vi
|
||||||
set -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
|
# Start window index at 1, for chromium-like tab switching
|
||||||
set -g base-index 1
|
set -g base-index 1
|
||||||
|
|
|
@ -36,6 +36,10 @@ if vim.fn.has('nvim') == 1 then
|
||||||
autostart = false,
|
autostart = false,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
lspconfig.clangd.setup{
|
||||||
|
autostart = false,
|
||||||
|
}
|
||||||
|
|
||||||
-- Function to start LSP
|
-- Function to start LSP
|
||||||
function LspUp()
|
function LspUp()
|
||||||
vim.cmd[[LspStart]]
|
vim.cmd[[LspStart]]
|
||||||
|
@ -72,9 +76,21 @@ vim.api.nvim_create_autocmd('LspAttach', {
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("BufRead", {
|
vim.api.nvim_create_autocmd("BufRead", {
|
||||||
callback = function()
|
callback = function()
|
||||||
vim.treesitter.stop()
|
vim.treesitter.stop()
|
||||||
end,
|
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('*'),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue