aboutsummaryrefslogtreecommitdiff
path: root/lua/user/opts.lua
diff options
context:
space:
mode:
authorsrdusr <trevorgray@srdusr.com>2022-10-26 00:00:35 +0200
committersrdusr <trevorgray@srdusr.com>2022-10-26 00:00:35 +0200
commit7f30d31c9142bbeb10a21b4de9f58bc6d3a0a3f1 (patch)
tree33fb7e88cc52a7b44994cdaedf3e85b18feee753 /lua/user/opts.lua
parent463a9cef8349bbfd2ebf77f60a6a82799271021a (diff)
downloaddotfiles-7f30d31c9142bbeb10a21b4de9f58bc6d3a0a3f1.tar.gz
dotfiles-7f30d31c9142bbeb10a21b4de9f58bc6d3a0a3f1.zip
Removed unnecessary files
Diffstat (limited to 'lua/user/opts.lua')
-rw-r--r--lua/user/opts.lua68
1 files changed, 59 insertions, 9 deletions
diff --git a/lua/user/opts.lua b/lua/user/opts.lua
index 3200cd5..39cd2a4 100644
--- a/lua/user/opts.lua
+++ b/lua/user/opts.lua
@@ -19,9 +19,11 @@ vim.g.loaded_python3_provider = 1 --
vim.g.sh_noisk = 1 -- iskeyword word boundaries when editing a 'sh' file
--vim.opt.sessionoptions = "buffers,curdir,folds,help,tabpages,winsize,resize,winpos,terminal,globals" --
+-- Colors
vim.opt.termguicolors = true
+
-- Behaviour
-vim.opt.clipboard:append({ "unnamedplus" }) --
+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
@@ -32,7 +34,7 @@ vim.opt.autoread = true -- reload files if changed externally
vim.opt.display = "lastline" -- Show as much as possible of the last line.
vim.opt.inccommand = "split" --
vim.opt.ttyfast = true -- Faster redrawing.
-vim.opt.lazyredraw = true -- Only redraw when necessary
+--vim.opt.lazyredraw = true -- Only redraw when necessary
vim.opt.keywordprg = ":help" -- :help options
vim.opt.ruler = true --
vim.opt.errorbells = false --
@@ -67,8 +69,9 @@ vim.opt.smartindent = true -- smart indent
vim.opt.number = true --
--vim.opt.title = true --
--vim.opt.colorcolumn = "+1" --
---vim.opt.signcolumn = "yes:1" -- always show the sign column
-vim.opt.signcolumn = "number"
+vim.opt.signcolumn = "yes:1" -- always show the sign column
+--vim.opt.signcolumn = "yes:" .. vim.o.numberwidth
+--vim.opt.signcolumn = "number"
--vim.opt.signcolumn = "no" --
vim.opt.laststatus = 3 -- " Always show statusline.
vim.opt.showmode = true -- Show current mode in command-line, example: -- INSERT -- mode
@@ -87,6 +90,11 @@ vim.opt.report = 0 -- Always report changed lines.
-- end
-- end,
--})
+---- With vertical splits, the statusline would still show up at the
+---- bottom of the split. A quick fix is to just set the statusline
+---- to empty whitespace (it can't be an empty string because then
+---- it'll get replaced by the default stline).
+vim.opt.stl = " "
-- Backup/undo
vim.opt.backup = false --
@@ -101,16 +109,53 @@ vim.cmd([[let &t_Ce = "\e[4:0m"]]) --
vim.opt.path:append({ "**" }) -- Finding files - Search down into subfolder
vim.cmd("set whichwrap+=<,>,[,],h,l") --
vim.cmd([[set iskeyword+=-]]) --
-vim.cmd([[set formatoptions-=cro]]) -- TODO: this doesn't seem to work
+--vim.cmd([[set formatoptions-=cro]]) -- TODO: this doesn't seem to work
+vim.opt.formatoptions = vim.opt.formatoptions
+ - "t" -- wrap with text width
+ + "c" -- wrap comments
+ + "r" -- insert comment after enter
+ - "o" -- insert comment after o/O
+ - "q" -- allow formatting of comments with gq
+ - "a" -- format paragraphs
+ + "n" -- recognized numbered lists
+ - "2" -- use indent of second line for paragraph
+ + "l" -- long lines are not broken
+ + "j" -- remove comment when joining lines
vim.opt.wrapscan = true -- " Searches wrap around end-of-file.
--vim.wo.number = true --
--vim.opt.wrap = false -- No Wrap lines
--vim.opt.foldmethod = 'manual' --
--vim.opt.foldmethod = "expr" --
+vim.opt.foldmethod = "manual"
+vim.opt.foldlevel = 3
+vim.opt.confirm = true
+vim.opt.shortmess:append("sI")
+--vim.opt.shortmess = "a"
+--vim.opt.shortmess = "sI"
+--vim.o.shortmess = vim.o.shortmess:gsub('s', '')
+vim.opt.fillchars = {
+ horiz = "━",
+ horizup = "┻",
+ horizdown = "┳",
+ vert = "┃",
+ vertleft = "┨",
+ vertright = "┣",
+ verthoriz = "╋",
+ fold = "⠀",
+ eob = " ",
+ diff = "┃",
+ msgsep = "‾",
+ foldopen = "▾",
+ foldsep = "│",
+ foldclose = "▸",
+}
+vim.opt.listchars = { tab = "▸ ", trail = "·" } --
+--vim.opt.fillchars:append({ eob = " " }) -- remove the ~ from end of buffer
vim.opt.modeline = true --
vim.opt.modelines = 3 -- modelines (comments that set vim options on a per-file basis)
+vim.opt.modelineexpr = true
--vim.opt.nofoldenable = true -- turn folding off
-vim.opt.foldenable = false -- turn folding off
+--vim.opt.foldenable = false -- turn folding off
-- Highlights
vim.opt.incsearch = true -- Highlight while searching with / or ?.
@@ -121,7 +166,8 @@ vim.opt.synmaxcol = 200 -- Only highlight the first 200 columns.
vim.opt.winblend = 30
--vim.opt.winblend = 5
vim.opt.wildoptions = "pum" --
-vim.opt.pumblend = 5 --
+--vim.opt.pumblend = 5 --
+vim.opt.pumblend = 12 --
--vim.opt.pumblend=15
vim.opt.pumheight = 10 -- pop up menu height
@@ -148,6 +194,12 @@ vim.opt.wildignore:append({ "*.pyc" }) -- Python byte code
vim.opt.wildignore:append({ "*.orig" }) -- Merge resolution files
vim.opt.wildignore:append({ "*/node_modules/*" }) --
+-- Shada
+vim.opt.shada = "!,'1000,f1,<1000,s100,:1000,/1000,h"
+
+-- Sessions
+vim.opt.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal"
+
-- Cursorline
vim.cmd([[ " Only show cursorline in the current window and in normal mode
augroup cline
@@ -167,8 +219,6 @@ vim.cmd([[ " Only show in insert mode
au InsertLeave * :set listchars+=trail:⌴
augroup END
]])
-vim.opt.listchars = { tab = "▸ ", trail = "·" } --
-vim.opt.fillchars:append({ eob = " " }) -- remove the ~ from end of buffer
-- Line Return
vim.cmd([[ " Return to the same line when we reopen a file