add yank and paste to system clipboard
This commit is contained in:
parent
d95ca94917
commit
2f01e7ed9c
20
init.lua
20
init.lua
@ -185,9 +185,10 @@ require('lazy').setup({
|
||||
'lukas-reineke/indent-blankline.nvim',
|
||||
-- Enable `lukas-reineke/indent-blankline.nvim`
|
||||
-- See `:help indent_blankline.txt`
|
||||
main = "ibl",
|
||||
opts = {
|
||||
char = '┊',
|
||||
show_trailing_blankline_indent = false,
|
||||
-- char = '┊',
|
||||
-- show_trailing_blankline_indent = false,
|
||||
},
|
||||
},
|
||||
|
||||
@ -200,6 +201,7 @@ require('lazy').setup({
|
||||
branch = '0.1.x',
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
'olexsmir/gopher.nvim',
|
||||
-- Fuzzy Finder Algorithm which requires local dependencies to be built.
|
||||
-- Only load if `make` is available. Make sure you have the system
|
||||
-- requirements installed.
|
||||
@ -249,7 +251,7 @@ require('lazy').setup({
|
||||
|
||||
require("tokyonight").setup({
|
||||
style = "night", -- The theme comes in three styles, `storm`, `moon`, a darker variant `night` and `day`
|
||||
transparent = true, -- Enable this to disable setting the background color
|
||||
transparent = false, -- Enable this to disable setting the background color
|
||||
})
|
||||
|
||||
vim.cmd[[colorscheme tokyonight]]
|
||||
@ -316,6 +318,18 @@ vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv")
|
||||
|
||||
vim.keymap.set("n", "<leader>pv", vim.cmd.Ex)
|
||||
|
||||
-- Copy to clipboard
|
||||
vim.api.nvim_set_keymap('n', '<leader>y', '"+y', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<leader>Y', '"+yg_', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<leader>yy', '"+yy', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('v', '<leader>y', '"+y', { noremap = true, silent = true })
|
||||
|
||||
-- Paste from clipboard
|
||||
vim.api.nvim_set_keymap('n', '<leader>p', '"+p', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<leader>P', '"+P', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('v', '<leader>p', '"+p', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('v', '<leader>P', '"+P', { noremap = true, silent = true })
|
||||
|
||||
-- [[ Highlight on yank ]]
|
||||
-- See `:help vim.highlight.on_yank()`
|
||||
local highlight_group = vim.api.nvim_create_augroup('YankHighlight', { clear = true })
|
||||
|
Loading…
Reference in New Issue
Block a user