nvim: Reintroduce clipboard settings

clipboard support just seems to be completely flaky right now. Add
previous settings but instead of tmux specific commands use wayland
clipboard tools.

This should make it work everywhere. One downside of this setting is
we go back to polluting system clipboard every time & does not really
matter if we copy to + or * register. Both will result in a call to
wl-copy.
This commit is contained in:
Sanchayan Maity 2023-01-19 11:44:17 +05:30
parent 8206103d7d
commit a64baccca1
Signed by: sanchayanmaity
GPG Key ID: 6F6A0609C12038F3
1 changed files with 14 additions and 0 deletions

View File

@ -72,6 +72,20 @@ vim.g.matchup_surround_enabled = 1
-- textobj-word-column
vim.g.textobj_wordcolumn_no_default_key_mappings = 1
-- See :help clipboard and https://github.com/neovim/neovim/issues/14545
vim.g.clipboard = {
name = "clipboard",
copy = {
["+"] = "wl-copy",
["*"] = "wl-copy"
},
paste = {
["+"] = "wl-paste",
["*"] = "wl-paste"
},
cache_enabled = true
}
-- No default mappings for tmux navigator
vim.g.tmux_navigator_no_mappings = 1
-- Write the current buffer, but only if changed before navigating from Vim to tmux pane