-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.lua
More file actions
70 lines (52 loc) · 1.62 KB
/
init.lua
File metadata and controls
70 lines (52 loc) · 1.62 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
68
69
70
vim.g.mapleader = " "
-- enables relative numbers
vim.opt.number = true
vim.opt.relativenumber = true
-- enables persistent undos
vim.opt.undofile = true
-- number of lines away from bottom/top of the page from the cursor
vim.opt.scrolloff = 6
-- enable line wrapping
vim.opt.wrap = true
vim.opt.linebreak = true
-- disables signcolumn
vim.opt.signcolumn = "no"
-- set default tabs to 4 spaces
-- will be overriden if a specific file type is read from ./ftplugin/
local tab_size = 4
vim.opt.expandtab = true
vim.opt.tabstop = tab_size
vim.opt.shiftwidth = tab_size
vim.opt.softtabstop = tab_size
-- smart case search with "/"
vim.opt.ignorecase = true
vim.opt.smartcase = true
-- disables annoying swap
vim.opt.swapfile = false
-- set new split directions
vim.opt.splitright = true
vim.opt.splitbelow = true
-- gives a visualisation for text replacement ":%s/<TEXT>/<REPLACEMENT>/<MODIFIERS>"
vim.opt.inccommand = "split"
-- replaces the "~" on left sidebar with nothing
vim.opt.fillchars = { eob = " " }
-- disables nvims inbuilt status bar (replacing with lualine) and makes status bar flush with bottom
vim.opt.cmdheight = 0
vim.opt.showmode = false
-- load custom colorscheme
-- require("config.colorscheme")
-- load plugins
for _, file in ipairs(vim.fn.globpath(vim.fn.stdpath("config") .. "/lua/plugins", "*.lua", false, true)) do
dofile(file)
end
-- source autocmds
require("config.autocmds")
-- source commands
require("config.commands")
-- source after everything else
vim.schedule(function()
-- source keymaps
require("config.keymaps")
-- links nvim clipboard with system clipboard
vim.opt.clipboard = "unnamedplus"
end)