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
|
vim.o.shiftwidth = 4
vim.o.tabstop = 4
vim.o.softtabstop = 4
vim.o.expandtab = true
vim.o.hlsearch = false
vim.o.number = true
vim.o.mouse = "a"
vim.o.ignorecase = true
vim.o.smartcase = true
vim.o.updatetime = 100
vim.o.timeout = true
vim.o.timeoutlen = 300
vim.o.completeopt = "menuone,noselect"
vim.o.termguicolors = true
vim.o.swapfile = false
vim.o.backup = false
vim.o.incsearch = true
vim.o.scrolloff = 5
vim.o.colorcolumn = "80,120"
vim.o.fileformat = "unix"
vim.o.encoding = "utf-8"
vim.o.autoread = true
vim.api.nvim_create_autocmd({ "BufEnter", "CursorHold", "CursorHoldI", "FocusGained" }, {
command = "if mode() != 'c' | checktime | endif",
pattern = { "*" },
})
vim.o.cinoptions = "l1,g0,N-s,(s,U1,w1,Ws"
vim.o.list = true
vim.o.listchars = "lead:·"
require("ibl").setup {
scope = {
enabled = false,
},
indent = {
char = "|",
},
}
vim.api.nvim_create_autocmd({ "BufWritePre" }, {
pattern = {"*"},
callback = function(ev)
save_cursor = vim.fn.getpos(".")
vim.cmd("%s/\\s\\+$//e")
vim.fn.setpos(".", save_cursor)
end,
})
vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, {
command = "set filetype=glsl",
pattern = { "*.frag", "*.vert" },
})
|