init.lua/lua/core/options.lua(view raw)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
local o, g = vim.opt, vim.g
pcall(vim.cmd.colorscheme, "kanagawa")
-- leader
g.mapleader = " "
g.maplocalleader = ","
-- indent
o.smartindent = true
o.expandtab = true
o.cursorline = true
o.shiftwidth = 4
o.tabstop = 4
o.ignorecase = true
o.smartcase = true
o.number = true
o.termguicolors = true
o.completeopt = { "menuone", "noselect" }
o.clipboard = "unnamedplus"
o.fileencoding = "utf-8"
o.mouse = "a"
o.showmode = false
o.splitbelow = true
o.splitright = true
o.pumheight = 8
o.numberwidth = 4
o.scrolloff = 8
o.sidescrolloff = 8
o.signcolumn = "yes"
o.hidden = true
o.title = true
o.wrap = false
-- listchars
o.list = true
o.listchars = {
space = "·",
trail = "~",
tab = "|·",
}
-- swap files
o.undofile = true
o.swapfile = false
o.writebackup = false
-- disable build-in modules
g.loaded_perl_provider = 0
g.loaded_ruby_provider = 0
g.loaded_node_provider = 0
for _, i in pairs {
"netrw",
"netrwPlugin",
"netrwSettings",
"netrwFileHandlers",
"gzip",
"zip",
"tohtml",
"man",
"zipPlugin",
"tar",
"tarPlugin",
"getscript",
"getscriptPlugin",
"vimball",
"vimballPlugin",
"2html_plugin",
"logipat",
"rrhelper",
"spellfile_plugin",
"matchit",
} do
vim.g["loaded_" .. i] = 1
end
|