aboutsummaryrefslogtreecommitdiff
path: root/.config/nvim/lua/user/opts.lua
diff options
context:
space:
mode:
authorsrdusr <trevorgray@srdusr.com>2023-07-18 22:12:36 +0200
committersrdusr <trevorgray@srdusr.com>2023-07-18 22:12:36 +0200
commit7890d905df24db4947db45edc1c4c1bd60fbbd1b (patch)
tree2d73d26c371f37553e119e4902880587d78b6cc9 /.config/nvim/lua/user/opts.lua
parentc859a2dccf16a2849f8fe8d9fe76515bf228a3c9 (diff)
parent01e02751d178a92284b1dcfdcd9a4aa6220ec364 (diff)
downloaddotfiles-7890d905df24db4947db45edc1c4c1bd60fbbd1b.tar.gz
dotfiles-7890d905df24db4947db45edc1c4c1bd60fbbd1b.zip
Merge commit '3ea9490ace845987a5af317e6d9e1d70cb34036f'
Diffstat (limited to '.config/nvim/lua/user/opts.lua')
-rw-r--r--.config/nvim/lua/user/opts.lua15
1 files changed, 12 insertions, 3 deletions
diff --git a/.config/nvim/lua/user/opts.lua b/.config/nvim/lua/user/opts.lua
index 6375350..bb7f36c 100644
--- a/.config/nvim/lua/user/opts.lua
+++ b/.config/nvim/lua/user/opts.lua
@@ -47,8 +47,10 @@ vim.o.autochdir = true
-- Colors
vim.opt.termguicolors = true
+-- Clipboard
+vim.opt.clipboard:append({ "unnamedplus" }) -- Install xclip or this will slowdown startup
+
-- Behaviour
-vim.opt.clipboard:append({ "unnamedplus" }) -- Install xclip or this will slowdown startup
vim.opt.backspace = { "start", "eol", "indent" } -- Make backspace work as you would expect.
vim.opt.hidden = true -- Switch between buffers without having to save first.
vim.opt.splitbelow = true -- make split put the new buffer below the current buffer
@@ -123,11 +125,13 @@ vim.opt.report = 0 -- Always report changed lines.
-- Backup/undo/swap
local prefix = vim.env.XDG_CONFIG_HOME or vim.fn.expand("~/.config")
+--vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir"
vim.opt.undodir = { prefix .. "/nvim/tmp/.undo//" }
vim.opt.backupdir = { prefix .. "/nvim/tmp/.backup//" }
vim.opt.directory = { prefix .. "/nvim/tmp/.swp//" }
vim.opt.backup = false --
-vim.opt.undofile = false --
+--vim.opt.undofile = false --
+vim.opt.undofile = true --
vim.opt.swapfile = true --
-- Add timestamp as extension for backup files
vim.api.nvim_create_autocmd('BufWritePre', {
@@ -141,6 +145,7 @@ vim.api.nvim_create_autocmd('BufWritePre', {
-- Format
--vim.opt.textwidth = 80 --
+vim.opt.isfname:append("@-@")
vim.cmd([[let &t_Cs = "\e[4:3m"]]) -- Undercurl
vim.cmd([[let &t_Ce = "\e[4:0m"]]) --
vim.opt.path:append({ "**" }) -- Finding files - Search down into subfolder
@@ -243,7 +248,11 @@ vim.opt.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpo
--vim.opt.sessionoptions = "buffers,curdir,folds,help,tabpages,winsize,winpos,terminal"
--vim.opt.sessionoptions:remove({ "blank", "buffers", "globals" })
-vim.opt.clipboard:append({ "unnamedplus" }) -- Install xclip or this will slowdown startup
+-- Netrw file tree
+vim.g.netrw_browse_split = 0
+vim.g.netrw_banner = 0
+vim.g.netrw_winsize = 25
+
-- Cursorline
vim.cmd([[ " Only show cursorline in the current window and in normal mode
augroup cline