From ad73baa2d3059f7caa60fdcbe964ed983724da3b Mon Sep 17 00:00:00 2001 From: Andrew Scott Date: Sun, 2 Apr 2023 02:38:06 -0400 Subject: [PATCH] Fix for saving swap files to .cache --- dot_config/nvim/init.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dot_config/nvim/init.lua b/dot_config/nvim/init.lua index e8192df..b3aca8f 100644 --- a/dot_config/nvim/init.lua +++ b/dot_config/nvim/init.lua @@ -2,8 +2,6 @@ vim.g.mapleader = " " vim.keymap.set({ "n", "v" }, "y", '"+y', { noremap = true, silent = true }) -vim.cmd('syntax enable') - vim.opt.encoding = 'utf-8' vim.opt.fileencoding = 'utf-8' vim.opt.mouse = 'a' @@ -32,7 +30,11 @@ vim.opt.updatetime = 300 vim.opt.timeoutlen = 500 vim.opt.autochdir = true vim.opt.swapfile = true -vim.opt.dir = '~/.cache/nvim' + +vim.cmd [[ + syntax enable + set dir=~/.cache/nvim +]] local Plug = vim.fn['plug#'] vim.call('plug#begin', '~/.local/share/nvim/plugged')