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
|
-- Colorscheme
vim.opt.termguicolors = true
vim.cmd.colorscheme("ayu")
-- Light colorscheme just in case
-- vim.opt.background = "light"
-- vim.cmd.colorscheme("PaperColor")
-- Tab configuration
vim.opt.tabstop = 4
vim.opt.softtabstop = 4
vim.opt.shiftwidth = 4
vim.opt.expandtab = true
vim.opt.backspace = {"indent", "eol", "start"}
-- Show whitespace characters
vim.opt.listchars = {
tab = "├─┤",
trail = "␠",
nbsp = "⎵",
lead = "·"
}
vim.opt.list = true
-- Set line numbering rules
vim.wo.number = true
vim.wo.relativenumber = true
vim.api.nvim_create_autocmd("InsertEnter", {
pattern = "*",
callback = function (ev)
vim.wo.number = true
vim.wo.relativenumber = false
end
})
vim.api.nvim_create_autocmd("InsertLeave", {
pattern = "*",
callback = function (ev)
vim.wo.number = true
vim.wo.relativenumber = true
end
})
-- Automatically change current directory to be the same as the file editing
vim.opt.autochdir = true
-- Remove conceal for all files
vim.opt.conceallevel = 0
-- Paragraph formatter
-- let &formatprg="par -w80"
-- Encodings
vim.opt.fileencodings = {"utf8", "cp1251", "koi8-r", "latin1"}
-- " Spelling
-- set spell spelllang=ru,en
-- Add vertical rulers
vim.opt.colorcolumn = {81, 121}
-- netrw
vim.g.netrw_banner = false
vim.g.netrw_liststyle = 1
require("keybindings")
require("filetype-config")
require("plugins")
require("lsp")
|