From 9a1efff30cffceb15f240ec6389eeca200d47552 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 7 Mar 2022 21:58:37 +0100 Subject: [PATCH] nvim: Fix vim-slime temp file, cmp float window Fixed hidden file creation in home directory by vim-slime. It will now rather ask nvim to create a temporary file using that as its paste source. Also disabled cmp completion in 'guihua' floating windows, as per the recommendation for navigator.lua. --- nvim/.config/nvim/lua/plug/_lsp.lua | 2 ++ nvim/.config/nvim/lua/plugins.lua | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/nvim/.config/nvim/lua/plug/_lsp.lua b/nvim/.config/nvim/lua/plug/_lsp.lua index c54a510..ce2acaa 100644 --- a/nvim/.config/nvim/lua/plug/_lsp.lua +++ b/nvim/.config/nvim/lua/plug/_lsp.lua @@ -72,6 +72,8 @@ cmp.setup({ {name = 'pandoc_references'}, {name = 'vCard'} }, {{name = 'buffer'}, {name = 'spell'}}) }) +if vim.o.ft == 'clap_input' and vim.o.ft == 'guihua' and vim.o.ft == + 'guihua_rust' then require'cmp'.setup.buffer {completion = {enable = false}} end -- Use buffer source for `/` search cmp.setup.cmdline('/', {sources = {{name = 'buffer'}}}) diff --git a/nvim/.config/nvim/lua/plugins.lua b/nvim/.config/nvim/lua/plugins.lua index d77650e..b49c7c8 100644 --- a/nvim/.config/nvim/lua/plugins.lua +++ b/nvim/.config/nvim/lua/plugins.lua @@ -122,9 +122,9 @@ require("packer").startup(function() -- REPL work use { 'jpalardy/vim-slime', -- send arbitrary code chunks to REPLs - ft = "python", config = function() vim.g.slime_target = 'tmux' + vim.g.slime_paste_file = vim.fn.tempname() vim.g.slime_default_config = { socket_name = "default", target_pane = "{last}"