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.
This commit is contained in:
Marty Oehme 2022-03-07 21:58:37 +01:00
parent bef798418e
commit 9a1efff30c
Signed by: Marty
GPG key ID: B7538B8F50A1C800
2 changed files with 3 additions and 1 deletions

View file

@ -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'}}})

View file

@ -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}"