From 47489ff328558cc819ca9755aa1715fb5b1913bd Mon Sep 17 00:00:00 2001 From: Eric Olerud Date: Thu, 19 Sep 2024 00:43:57 -0400 Subject: [PATCH] sync clipboard between neovim and OS --- init.lua | 5 +++-- lua/custom/plugins/floaterm.lua | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index 2dfc07f0..44ecbcb3 100644 --- a/init.lua +++ b/init.lua @@ -28,6 +28,9 @@ vim.opt.showmode = false -- Remove this option if you want your OS clipboard to remain independent. -- See `:help 'clipboard'` -- vim.opt.clipboard = 'unnamedplus' +vim.schedule(function() + vim.opt.clipboard = 'unnamedplus' +end) -- Enable break indent vim.opt.breakindent = true @@ -84,8 +87,6 @@ vim.opt.hlsearch = true vim.keymap.set('n', '', 'nohlsearch') -- Diagnostic keymaps -vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Go to previous [D]iagnostic message' }) -vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next [D]iagnostic message' }) vim.keymap.set('n', 'e', vim.diagnostic.open_float, { desc = 'Show diagnostic [E]rror messages' }) vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' }) diff --git a/lua/custom/plugins/floaterm.lua b/lua/custom/plugins/floaterm.lua index b30b6ff3..e56ae762 100644 --- a/lua/custom/plugins/floaterm.lua +++ b/lua/custom/plugins/floaterm.lua @@ -3,3 +3,4 @@ return { dependencies = {}, config = function() end, } +-- :FloatermNew to open a window