feat: make use of vim.opt

!!! BREAKING : requires neovim #13479 (commit `43956de` on master)
This commit is contained in:
David JULIEN 2021-05-29 23:56:27 +02:00
parent 12fd83dd6e
commit 2737cfc4a2
1 changed files with 41 additions and 41 deletions

View File

@ -3,55 +3,55 @@
-- License : GPLv3 -- License : GPLv3
-- Description : neovim settings file -- Description : neovim settings file
local g = vim.g local opt = vim.opt
local g = vim.g
local o = vim.o
local w = vim.wo
local b = vim.bo
-- general -- general
o.wildignore = [[ opt.wildignore = {
.git ".git",
*.o,*.class "*.o", "*.class",
*.jpg,*.jpeg,*.png "*.jpg", "*.jpeg", "*.png",
*.avi,*.mp4,*.mkv "*.pdf",
*.mp3,*.ogg,*.flac "*.zip", "*.gz", "*.rar", "*.tar.xz",
*.eot,*.otf,*.ttf,*.woff }
*.pdf opt.wildmode = { "longest", "full" }
*.zip,*.gz,*.rar,*.tar.xz opt.wildoptions = "pum"
]] g.loaded_netrw = 1 -- disable netrw
o.wildmode = "longest,full"
o.wildoptions = "pum"
g.netrw_dirhistmax = 0
-- editor -- editor
o.splitright = true opt.splitright = true
o.splitbelow = true opt.splitbelow = true
o.scrolloff = 4 opt.scrolloff = 4
o.termguicolors = true opt.termguicolors = true
o.background = "dark" opt.background = "dark"
o.shortmess = o.shortmess .. "c" opt.shortmess = opt.shortmess:append { c = true }
w.number = true opt.number = true
w.relativenumber = true opt.relativenumber = true
w.signcolumn = "yes" opt.signcolumn = "yes"
o.listchars = "tab:<->,nbsp:␣,trail:·,extends:>,precedes:<" opt.listchars = {
o.showmatch = true tab = "<->",
o.ignorecase = true nbsp = "",
o.smartcase = true trail = "·",
o.inccommand = "split" extends = ">",
o.completeopt = "menuone,noselect" precedes = "<",
}
opt.showmatch = true
opt.ignorecase = true
opt.smartcase = true
opt.inccommand = "split"
opt.completeopt = { "menuone", "noselect" }
-- statusline -- statusline
o.laststatus = 2 opt.laststatus = 2
o.showmode = false opt.showmode = false
-- text, tabs, indents -- text, tabs, indents
b.textwidth = 79 opt.textwidth = 79
b.shiftwidth = 8 opt.shiftwidth = 8
b.softtabstop = -1 opt.softtabstop = -1
b.expandtab = true opt.expandtab = true
b.shiftwidth = 0 opt.shiftwidth = 0
o.backspace = "indent,eol,start" opt.backspace = { "indent", "eol", "start" }
-- augroups -- augroups
utils.create_augroup({ utils.create_augroup({