-
Notifications
You must be signed in to change notification settings - Fork 461
/
Copy pathoptions.lua
131 lines (126 loc) · 3.55 KB
/
options.lua
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
local global = require("core.global")
local function load_options()
local global_local = {
-- backupdir = global.cache_dir .. "backup/",
-- directory = global.cache_dir .. "swap/",
-- pumblend = 10,
-- spellfile = global.cache_dir .. "spell/en.uft-8.add",
-- viewdir = global.cache_dir .. "view/",
-- winblend = 10,
autoindent = true,
autoread = true,
autowrite = true,
backspace = "indent,eol,start",
backup = false,
backupskip = "/tmp/*,$TMPDIR/*,$TMP/*,$TEMP/*,*/shm/*,/private/var/*,.vault.vim",
breakat = [[\ \ ;:,!?]],
breakindentopt = "shift:2,min:20",
clipboard = "unnamedplus",
cmdheight = 2, -- 0, 1, 2
cmdwinheight = 5,
complete = ".,w,b,k",
completeopt = "menuone,noselect",
concealcursor = "niv",
conceallevel = 0,
cursorcolumn = true,
cursorline = true,
diffopt = "filler,iwhite,internal,algorithm:patience",
display = "lastline",
encoding = "utf-8",
equalalways = false,
errorbells = true,
expandtab = true,
fileformats = "unix,mac,dos",
foldenable = true,
foldlevelstart = 99,
formatoptions = "1jcroql",
grepformat = "%f:%l:%c:%m",
grepprg = "rg --hidden --vimgrep --smart-case --",
helpheight = 12,
hidden = true,
history = 2000,
ignorecase = true,
inccommand = "nosplit",
incsearch = true,
infercase = true,
jumpoptions = "stack",
laststatus = 2,
linebreak = true,
list = true,
listchars = "tab:»·,nbsp:+,trail:·,extends:→,precedes:←",
magic = true,
mousescroll = "ver:3,hor:6",
number = true,
previewheight = 12,
pumheight = 15,
redrawtime = 1500,
relativenumber = true,
ruler = true,
scrolloff = 2,
sessionoptions = "curdir,help,tabpages,winsize",
shada = "!,'300,<50,@100,s10,h",
shiftround = true,
shiftwidth = 4,
shortmess = "aoOTIcF",
showbreak = "↳ ",
showcmd = false,
showmode = false,
showtabline = 2,
sidescrolloff = 5,
signcolumn = "yes",
smartcase = true,
smarttab = true,
softtabstop = 4,
splitbelow = true,
splitright = true,
startofline = false,
swapfile = false,
switchbuf = "usetab,uselast",
synmaxcol = 2500,
tabstop = 4,
termguicolors = true,
timeout = true,
timeoutlen = 300,
ttimeout = true,
ttimeoutlen = 0,
undodir = global.cache_dir .. "undo/",
undofile = true,
-- Please do NOT set `updatetime` to above 500, otherwise most plugins may not function correctly
updatetime = 200,
viewoptions = "folds,cursor,curdir,slash,unix",
virtualedit = "block",
visualbell = true,
whichwrap = "h,l,<,>,[,],~",
wildignore = ".git,.hg,.svn,*.pyc,*.o,*.out,*.jpg,*.jpeg,*.png,*.gif,*.zip,**/tmp/**,*.DS_Store,**/node_modules/**,**/bower_modules/**",
wildignorecase = true,
winminwidth = 10,
winwidth = 30,
wrap = false,
wrapscan = true,
writebackup = false,
}
local function isempty(s)
return s == nil or s == ""
end
-- custom python provider
local conda_prefix = os.getenv("CONDA_PREFIX")
if not isempty(conda_prefix) then
vim.g.python_host_prog = conda_prefix .. "/bin/python"
vim.g.python3_host_prog = conda_prefix .. "/bin/python"
elseif global.is_mac then
vim.g.python_host_prog = "/usr/bin/python"
vim.g.python3_host_prog = "/usr/local/bin/python3"
else
vim.g.python_host_prog = "/usr/bin/python"
vim.g.python3_host_prog = "/usr/bin/python3"
end
for name, value in pairs(global_local) do
vim.o[name] = value
end
-- Fix sqlite3 missing-lib issue on Windows
if global.is_windows then
-- Download the DLLs form https://www.sqlite.org/download.html
vim.g.sqlite_clib_path = global.home .. "/Documents/sqlite-dll-win64-x64-3400100/sqlite3.dll"
end
end
load_options()