-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoptions.lua
More file actions
61 lines (57 loc) · 1.69 KB
/
options.lua
File metadata and controls
61 lines (57 loc) · 1.69 KB
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
local utils = require "pea.utils"
local options = {
vim = {
clipboard = "unnamedplus",
cmdheight = 0,
completeopt = "menu,menuone,noselect",
conceallevel = 2,
confirm = true,
cursorline = true,
expandtab = true,
fileencoding = "utf-8",
fillchars = "eob: ",
fixeol = false,
guicursor = "i-ci-ve-t:hor30",
ignorecase = true,
laststatus = 3,
linebreak = true,
list = true,
listchars = "tab:⇤–⇥,multispace:·,trail:·,precedes:⇠,extends:⇢",
swapfile = false,
number = true,
shiftwidth = 4,
showmode = false,
showtabline = 0,
signcolumn = "yes",
smartcase = true,
smartindent = true,
smoothscroll = true,
splitbelow = true,
splitright = true,
tabstop = 4,
undofile = true,
updatetime = 250,
winborder = "rounded",
},
global = {
mapleader = " ",
},
}
if utils.is_windows then
options = vim.tbl_deep_extend("force", options, {
vim = {
shell = "pwsh",
shellcmdflag = "-NoLogo -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.UTF8Encoding]::new();$PSDefaultParameterValues['Out-File:Encoding']='utf8';",
shellpipe = "2>&1 | %{ '$_' } | Tee-Object %s; exit $LastExitCode",
shellquote = "",
shellredir = "2>&1 | %{ '$_' } | Out-File %s; exit $LastExitCode",
shellxquote = "",
},
})
end
for option, value in pairs(options.vim) do
vim.o[option] = value
end
for option, value in pairs(options.global) do
vim.g[option] = value
end