-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.lua
56 lines (48 loc) · 1.73 KB
/
init.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
require("custom.globals")
local options = {
guicursor = "", -- disable cursor styling
cursorline = false, -- disable cursor styling
completeopt = { "menuone", "noselect" }, -- options for insert mode completion (for cmp plugin)
conceallevel = 0, -- so that `` is visible in markdown files
cmdheight = 2, -- number of of screen lines to use for the command line
relativenumber = true, -- relative numbers from line cursor is on
swapfile = false,
hlsearch = true, -- highlight all matches of previous search pattern
incsearch = true, -- highlight matches of current search pattern as it is typed
scrolloff = 8, -- minimal number of screen lines to keep above and below the cursor.
-- smarttab = true,
tabstop = 2, -- number of spaces to insert for a tab
shiftwidth = 2, -- number of spaces inserted for each indentation
undofile = true, -- keep undo history between sessions
backup = false, -- Some servers have issues with backup files, see #649.
writebackup = false,
}
for key, value in pairs(options) do
vim.opt[key] = value
end
vim.opt.shortmess:append("c") -- hide startup message
-- highlight yank
vim.cmd([[
augroup highlight_yank
autocmd!
autocmd TextYankPost * silent! lua require'vim.highlight'.on_yank({timeout = 80})
augroup END
]])
-- wrap git commit body message lines at 72 characters
vim.cmd([["
augroup gitsetup
autocmd!
autocmd FileType gitcommit
\ autocmd CursorMoved,CursorMovedI *
\ let &l:textwidth = line('.') == 1 ? 50 : 72
augroup end
"]])
local enable_providers = {
"python3_provider",
-- and so on
}
for _, plugin in pairs(enable_providers) do
vim.g["loaded_" .. plugin] = nil
vim.cmd("runtime " .. plugin)
end
vim.g.python3_host_prog = "/bin/python3"