-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.lua
More file actions
67 lines (51 loc) · 1.29 KB
/
Copy pathinit.lua
File metadata and controls
67 lines (51 loc) · 1.29 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
62
63
64
65
66
67
require("remap")
vim.opt.list = true
vim.opt.listchars = { tab = "» ", trail = "·", nbsp = "␣" }
-- Indent
-- vim.opt.cpoptions:append('I')
vim.o.autoindent = true
vim.o.smartindent = true
vim.o.expandtab = true
vim.o.tabstop = 8
vim.o.softtabstop = 2
vim.o.shiftwidth = 2
-- Wrapped lines retain indent
vim.o.breakindent = true
-- Save undo history
vim.o.undofile = true
-- Case-insensitive searching UNLESS \C or capital in search
vim.o.ignorecase = true
vim.o.smartcase = true
-- Remove numbers from signcolumn
vim.wo.signcolumn = "yes:1"
vim.wo.relativenumber = false
vim.wo.number = true
-- Minimal number of screen lines to keep above and below the cursor.
vim.opt.scrolloff = 5
vim.o.updatetime = 1000
vim.o.timeoutlen = 300
vim.o.completeopt = "menu,preview,noselect"
vim.o.termguicolors = true
-- Colorscheme
vim.cmd.colorscheme("rose-pine-moon")
local autocmd = vim.api.nvim_create_autocmd
autocmd({ "BufWritePre" }, {
pattern = "*",
command = [[%s/\s\+$//e]],
})
autocmd("TextYankPost", {
pattern = "*",
callback = function()
vim.highlight.on_yank({
higroup = "IncSearch",
timeout = 40,
})
end,
})
autocmd("FileType", {
desc = "remove formatoptions",
callback = function()
vim.opt.formatoptions:remove({ "c", "r", "o" })
end,
})
require("plugins")